Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sync develop with release 2.4 #6278

Merged
merged 11 commits into from
Sep 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const load = async (context: Context, {customQuery}) => {
}

const profile = await context.$ct.api.getMe({ customer: true }, customQuery);
context.setCart(profile.data.me.activeCart);
return profile.data.me.customer;
};

Expand Down
8 changes: 6 additions & 2 deletions packages/commercetools/theme/components/AppHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
<script>
import { SfHeader, SfImage, SfIcon, SfButton, SfBadge, SfSearchBar, SfOverlay, SfMenuItem, SfLink } from '@storefront-ui/vue';
import { useUiState } from '~/composables';
import { onSSR } from '@vue-storefront/core';
import { useCart, useUser, cartGetters } from '@vue-storefront/commercetools';
import { computed, ref, onBeforeUnmount, watch } from '@vue/composition-api';
import { useUiHelpers } from '~/composables';
Expand Down Expand Up @@ -131,7 +132,7 @@ export default {
const { toggleCartSidebar, toggleWishlistSidebar, toggleLoginModal, isMobileMenuOpen } = useUiState();
const { setTermForUrl, getFacetsFromURL } = useUiHelpers();
const { isAuthenticated, load: loadUser } = useUser();
const { cart } = useCart();
const { cart, load: loadCart } = useCart();
const term = ref(getFacetsFromURL().phrase);
const isSearchOpen = ref(false);
const searchBarRef = ref(null);
Expand All @@ -145,7 +146,10 @@ export default {

const accountIcon = computed(() => isAuthenticated.value ? 'profile_fill' : 'profile');

loadUser();
onSSR(async () => {
await loadUser();
await loadCart();
});

// TODO: https://github.com/DivanteLtd/vue-storefront/issues/4927
const handleAccountClick = async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/commercetools/theme/pages/Checkout/Billing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
slim
>
<SfInput
v-e2e="'billing-apartment'"
v-e2e="'billing-streetNumber'"
:value="billingDetails.streetNumber"
@input="streetNumber => changeBillingDetails('streetNumber', streetNumber)"
:label="$t('House/Apartment number')"
Expand Down
2 changes: 1 addition & 1 deletion packages/commercetools/theme/pages/Checkout/Shipping.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
slim
>
<SfInput
v-e2e="'shipping-apartment'"
v-e2e="'shipping-streetNumber'"
:value="shippingDetails.streetNumber"
@input="streetNumber => changeShippingDetails('streetNumber', streetNumber)"
label="House number"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "US",
Expand All @@ -23,7 +23,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "US",
Expand All @@ -50,7 +50,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "US",
Expand All @@ -61,7 +61,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "US",
Expand All @@ -85,7 +85,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "US",
Expand All @@ -95,7 +95,7 @@
"billing": {
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "US",
Expand All @@ -120,7 +120,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "US",
Expand All @@ -130,7 +130,7 @@
"billing": {
"firstName": "Jane",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "US",
Expand All @@ -155,7 +155,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "US",
Expand All @@ -165,7 +165,7 @@
"billing": {
"firstName": "Jane",
"lastName": "Doe",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "US",
Expand All @@ -177,7 +177,7 @@
"shippingMethod": "Express US",
"errorMessage": "Please fill out this field."
},
"Should display an error - Apartment empty": {
"Should display an error - Street Number empty": {
"product": {
"name": "Shirt Aspesi white M",
"id": 1,
Expand All @@ -190,7 +190,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "US",
Expand Down Expand Up @@ -225,7 +225,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "US",
Expand All @@ -236,7 +236,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"state": "California",
"country": "US",
"postalCode": "90001",
Expand All @@ -260,7 +260,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "US",
Expand All @@ -271,7 +271,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "US",
Expand All @@ -295,7 +295,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "US",
Expand All @@ -306,7 +306,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "US",
Expand All @@ -330,7 +330,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "US",
Expand All @@ -341,7 +341,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"postalCode": "90001",
"phone": "+12345678910"
Expand All @@ -364,7 +364,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "US",
Expand All @@ -375,7 +375,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"country": "US",
"postalCode": "90001",
Expand All @@ -399,7 +399,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "US",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "United States",
Expand All @@ -39,7 +39,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "United States",
Expand All @@ -62,7 +62,7 @@
"shipping": {
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "United States",
Expand All @@ -85,7 +85,7 @@
"shipping": {
"firstName": "Jane",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "United States",
Expand All @@ -108,7 +108,7 @@
"shipping": {
"firstName": "Jane",
"lastName": "Doe",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "United States",
Expand All @@ -119,7 +119,7 @@
},
"errorMessage": "Please fill out this field."
},
"Should display an error - Apartment empty": {
"Should display an error - Street Number empty": {
"product": {
"name": "Shirt Aspesi white M",
"id": 1,
Expand Down Expand Up @@ -155,7 +155,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"state": "California",
"country": "United States",
"postalCode": "90001",
Expand All @@ -178,7 +178,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "United States",
Expand All @@ -201,7 +201,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"state": "California",
"country": "United States",
Expand All @@ -224,7 +224,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"postalCode": "90001",
"phone": "+12345678910"
Expand All @@ -246,7 +246,7 @@
"firstName": "Jane",
"lastName": "Doe",
"streetName": "Vuestorefront Rd.",
"apartment": "13/37",
"streetNumber": "13/37",
"city": "Los Angeles",
"country": "United States",
"postalCode": "90001",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"firstName": "John",
"lastName": "Doe",
"streetName": "1 VueStorefront Rd.",
"apartment": "23",
"streetNumber": "23",
"city": "Los Angeles",
"state": "California",
"country": "United States",
Expand All @@ -17,7 +17,7 @@
"firstName": "John",
"lastName": "Doe",
"streetName": "1 VueStorefront Rd.",
"apartment": "23",
"streetNumber": "23",
"city": "Los Angeles",
"state": "California",
"country": "United States",
Expand All @@ -37,7 +37,7 @@
"firstName": "John",
"lastName": "Doe",
"streetName": "1 VueStorefront Rd.",
"apartment": "23",
"streetNumber": "23",
"city": "Los Angeles",
"state": "California",
"country": "United States",
Expand All @@ -48,7 +48,7 @@
"firstName": "John",
"lastName": "Doe",
"streetName": "1 VueStorefront Rd.",
"apartment": "23",
"streetNumber": "23",
"city": "Los Angeles",
"state": "California",
"country": "United States",
Expand Down
Loading