@magento/venia-ui 9.1.0 → 9.2.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/i18n/en_US.json +22 -7
- package/lib/RootComponents/CMS/__tests__/cms.spec.js +50 -20
- package/lib/RootComponents/CMS/cms.js +39 -43
- package/lib/RootComponents/CMS/cms.module.css +17 -14
- package/lib/RootComponents/Category/NoProductsFound/noProductsFound.js +1 -1
- package/lib/RootComponents/Category/__tests__/__snapshots__/category.spec.js.snap +2 -2
- package/lib/RootComponents/Category/__tests__/__snapshots__/categoryContent.spec.js.snap +60 -0
- package/lib/RootComponents/Category/__tests__/category.spec.js +1 -1
- package/lib/RootComponents/Category/__tests__/categoryContent.spec.js +8 -0
- package/lib/RootComponents/Category/category.gql.js +2 -1
- package/lib/RootComponents/Category/category.js +6 -6
- package/lib/RootComponents/Category/categoryContent.js +11 -4
- package/lib/components/Accordion/section.js +6 -2
- package/lib/components/AccountChip/accountChip.gql.js +1 -1
- package/lib/components/AccountInformationPage/accountInformationPage.gql.js +5 -7
- package/lib/components/AccountInformationPage/accountInformationPage.js +5 -1
- package/lib/components/AccountInformationPage/editForm.js +22 -4
- package/lib/components/AccountMenu/accountMenu.js +1 -1
- package/lib/components/AccountMenu/accountMenuItems.js +2 -1
- package/lib/components/AddressBookPage/__tests__/__snapshots__/addressCard.spec.js.snap +5 -0
- package/lib/components/AddressBookPage/addEditDialog.js +36 -10
- package/lib/components/AddressBookPage/addressBookPage.js +5 -2
- package/lib/components/AddressBookPage/addressCard.js +17 -4
- package/lib/components/App/app.js +5 -1
- package/lib/components/App/localeProvider.js +2 -1
- package/lib/components/Breadcrumbs/breadcrumbs.js +3 -3
- package/lib/components/Breadcrumbs/breadcrumbs.module.css +10 -3
- package/lib/components/CartPage/GiftCards/giftCard.js +1 -0
- package/lib/components/CartPage/GiftCards/giftCards.js +2 -0
- package/lib/components/CartPage/PriceAdjustments/CouponCode/couponCode.js +3 -0
- package/lib/components/CartPage/PriceAdjustments/GiftOptions/giftOptions.js +3 -0
- package/lib/components/CartPage/PriceAdjustments/ShippingMethods/shippingForm.js +10 -2
- package/lib/components/CartPage/PriceAdjustments/ShippingMethods/shippingMethods.js +2 -1
- package/lib/components/CartPage/PriceAdjustments/ShippingMethods/shippingRadio.js +1 -1
- package/lib/components/CartPage/PriceAdjustments/ShippingMethods/shippingRadios.js +1 -1
- package/lib/components/CartPage/PriceAdjustments/giftCardSection.ee.js +1 -0
- package/lib/components/CartPage/PriceAdjustments/priceAdjustments.js +4 -1
- package/lib/components/CartPage/PriceSummary/discountSummary.js +8 -2
- package/lib/components/CartPage/PriceSummary/giftCardSummary.ee.js +4 -1
- package/lib/components/CartPage/PriceSummary/priceSummary.js +10 -3
- package/lib/components/CartPage/PriceSummary/shippingSummary.js +6 -1
- package/lib/components/CartPage/PriceSummary/taxSummary.js +1 -1
- package/lib/components/CartPage/ProductListing/EditModal/__tests__/__snapshots__/productDetail.spec.js.snap +3 -3
- package/lib/components/CartPage/ProductListing/EditModal/__tests__/__snapshots__/productForm.spec.js.snap +2 -2
- package/lib/components/CartPage/ProductListing/EditModal/productDetail.js +1 -1
- package/lib/components/CartPage/ProductListing/__tests__/__snapshots__/errorMessage.spec.js.snap +11 -0
- package/lib/components/CartPage/ProductListing/__tests__/errorMessage.spec.js +20 -0
- package/lib/components/CartPage/ProductListing/__tests__/product.spec.js +1 -0
- package/lib/components/CartPage/ProductListing/errorMessage.js +31 -0
- package/lib/components/CartPage/ProductListing/errorMessage.module.css +9 -0
- package/lib/components/CartPage/ProductListing/product.js +14 -7
- package/lib/components/CartPage/ProductListing/productListing.js +6 -1
- package/lib/components/CartPage/ProductListing/productListing.module.css +6 -0
- package/lib/components/CartPage/ProductListing/quantity.js +3 -0
- package/lib/components/CartPage/cartPage.js +1 -1
- package/lib/components/CategoryList/__tests__/categoryList.spec.js +2 -0
- package/lib/components/CategoryList/categoryList.js +4 -2
- package/lib/components/CategoryList/categoryList.module.css +2 -0
- package/lib/components/CategoryList/categoryTile.js +2 -0
- package/lib/components/CategoryList/categoryTile.module.css +2 -0
- package/lib/components/CategoryList/index.js +2 -0
- package/lib/components/CategoryTree/categoryBranch.js +2 -1
- package/lib/components/CategoryTree/categoryLeaf.js +1 -0
- package/lib/components/CategoryTree/categoryTree.js +3 -3
- package/lib/components/Checkbox/checkbox.module.css +11 -3
- package/lib/components/Checkout/addressForm.js +2 -3
- package/lib/components/CheckoutPage/GuestSignIn/guestSignIn.js +6 -2
- package/lib/components/CheckoutPage/ItemsReview/__fixtures__/cartItems.js +12 -12
- package/lib/components/CheckoutPage/ItemsReview/__tests__/__snapshots__/item.spec.js.snap +2 -2
- package/lib/components/CheckoutPage/ItemsReview/__tests__/__snapshots__/itemsReview.spec.js.snap +3 -3
- package/lib/components/CheckoutPage/ItemsReview/item.js +1 -1
- package/lib/components/CheckoutPage/ItemsReview/itemsReview.js +4 -1
- package/lib/components/CheckoutPage/OrderConfirmationPage/__tests__/__snapshots__/orderConfirmationPage.spec.js.snap +1 -1
- package/lib/components/CheckoutPage/OrderConfirmationPage/createAccount.js +6 -0
- package/lib/components/CheckoutPage/OrderConfirmationPage/orderConfirmationPage.js +10 -4
- package/lib/components/CheckoutPage/OrderSummary/orderSummary.js +1 -1
- package/lib/components/CheckoutPage/PaymentInformation/braintreeSummary.js +2 -1
- package/lib/components/CheckoutPage/PaymentInformation/creditCard.js +11 -1
- package/lib/components/CheckoutPage/PaymentInformation/editCard.js +1 -1
- package/lib/components/CheckoutPage/PaymentInformation/editModal.js +1 -1
- package/lib/components/CheckoutPage/PaymentInformation/paymentInformation.js +1 -1
- package/lib/components/CheckoutPage/ShippingInformation/AddressForm/__tests__/__snapshots__/guestForm.spec.js.snap +8 -0
- package/lib/components/CheckoutPage/ShippingInformation/AddressForm/__tests__/guestForm.spec.js +56 -1
- package/lib/components/CheckoutPage/ShippingInformation/AddressForm/customerForm.js +27 -4
- package/lib/components/CheckoutPage/ShippingInformation/AddressForm/guestForm.js +96 -9
- package/lib/components/CheckoutPage/ShippingInformation/card.js +1 -1
- package/lib/components/CheckoutPage/ShippingInformation/shippingInformation.js +14 -3
- package/lib/components/CheckoutPage/ShippingMethod/completedView.js +1 -0
- package/lib/components/CheckoutPage/ShippingMethod/shippingMethod.js +2 -1
- package/lib/components/CheckoutPage/ShippingMethod/updateModal.js +1 -0
- package/lib/components/CheckoutPage/__tests__/__snapshots__/checkoutPage.spec.js.snap +32 -0
- package/lib/components/CheckoutPage/__tests__/checkoutPage.spec.js +2 -0
- package/lib/components/CheckoutPage/checkoutPage.js +26 -4
- package/lib/components/ContactPage/__tests__/__snapshots__/contactLink.spec.js.snap +11 -0
- package/lib/components/ContactPage/__tests__/__snapshots__/contactPage.shimmer.spec.js.snap +113 -0
- package/lib/components/ContactPage/__tests__/__snapshots__/contactPage.spec.js.snap +312 -0
- package/lib/components/ContactPage/__tests__/contactLink.spec.js +58 -0
- package/lib/components/ContactPage/__tests__/contactPage.shimmer.spec.js +20 -0
- package/lib/components/ContactPage/__tests__/contactPage.spec.js +159 -0
- package/lib/components/ContactPage/contactLink.js +21 -0
- package/lib/components/ContactPage/contactPage.js +270 -0
- package/lib/components/ContactPage/contactPage.module.css +81 -0
- package/lib/components/ContactPage/contactPage.shimmer.js +104 -0
- package/lib/components/ContactPage/contactPage.shimmer.module.css +27 -0
- package/lib/components/ContactPage/index.js +2 -0
- package/lib/components/CreateAccount/createAccount.js +5 -0
- package/lib/components/Dialog/dialog.js +18 -4
- package/lib/components/ErrorMessage/errorMessage.js +7 -2
- package/lib/components/ErrorView/errorView.js +4 -2
- package/lib/components/Field/field.module.css +10 -6
- package/lib/components/FilterModal/CurrentFilters/currentFilter.js +7 -3
- package/lib/components/FilterModal/FilterList/__tests__/filterItem.spec.js +34 -5
- package/lib/components/FilterModal/FilterList/filterDefault.js +3 -2
- package/lib/components/FilterModal/FilterList/filterItem.js +27 -7
- package/lib/components/FilterModal/FilterList/filterList.js +6 -1
- package/lib/components/FilterModal/filterBlock.js +9 -4
- package/lib/components/FilterModal/filterFooter.js +1 -0
- package/lib/components/FilterModal/filterModal.js +6 -1
- package/lib/components/FilterModalOpenButton/filterModalOpenButton.js +1 -0
- package/lib/components/FilterSidebar/filterSidebar.js +6 -1
- package/lib/components/Footer/__tests__/__snapshots__/footer.spec.js.snap +14 -0
- package/lib/components/Footer/__tests__/footer.spec.js +9 -1
- package/lib/components/Footer/footer.js +14 -7
- package/lib/components/Footer/sampleData.js +8 -3
- package/lib/components/ForgotPassword/ForgotPasswordForm/forgotPasswordForm.js +3 -0
- package/lib/components/ForgotPassword/FormSubmissionSuccessful/formSubmissionSuccessful.js +4 -2
- package/lib/components/ForgotPassword/forgotPassword.gql.js +0 -1
- package/lib/components/FormError/formError.js +10 -4
- package/lib/components/Gallery/__tests__/__snapshots__/addToCartButton.spec.js.snap +0 -3
- package/lib/components/Gallery/__tests__/__snapshots__/item.spec.js.snap +1 -0
- package/lib/components/Gallery/addToCartButton.js +24 -20
- package/lib/components/Gallery/item.js +15 -4
- package/lib/components/Gallery/item.module.css +1 -0
- package/lib/components/Head/index.js +2 -1
- package/lib/components/Header/__tests__/header.spec.js +1 -1
- package/lib/components/Header/accountTrigger.js +1 -0
- package/lib/components/Header/cartTrigger.js +4 -1
- package/lib/components/Header/header.js +1 -1
- package/lib/components/Header/navTrigger.js +1 -0
- package/lib/components/Header/searchTrigger.js +1 -0
- package/lib/components/LegacyMiniCart/cartOptions.gql.js +4 -3
- package/lib/components/LegacyMiniCart/editFormFragment.gql.js +7 -3
- package/lib/components/LegacyMiniCart/kebab.js +1 -0
- package/lib/components/LegacyMiniCart/productOptions.js +6 -1
- package/lib/components/LegacyMiniCart/section.js +15 -5
- package/lib/components/Link/link.js +6 -4
- package/lib/components/Mask/mask.js +3 -3
- package/lib/components/MegaMenu/__tests__/MegaMenuItem.spec.js +1 -0
- package/lib/components/MegaMenu/__tests__/__snapshots__/MegaMenu.spec.js.snap +9 -0
- package/lib/components/MegaMenu/__tests__/__snapshots__/MegaMenuItem.spec.js.snap +6 -0
- package/lib/components/MegaMenu/__tests__/__snapshots__/Submenu.spec.js.snap +2 -0
- package/lib/components/MegaMenu/megaMenu.js +6 -2
- package/lib/components/MegaMenu/megaMenuItem.js +27 -6
- package/lib/components/MegaMenu/megaMenuItem.module.css +0 -5
- package/lib/components/MegaMenu/submenu.js +5 -3
- package/lib/components/MegaMenu/submenuColumn.js +15 -4
- package/lib/components/MiniCart/ProductList/__tests__/__snapshots__/item.spec.js.snap +4 -4
- package/lib/components/MiniCart/ProductList/item.js +5 -2
- package/lib/components/MiniCart/ProductList/productList.js +5 -1
- package/lib/components/MiniCart/__tests__/__snapshots__/miniCart.spec.js.snap +1 -1
- package/lib/components/MiniCart/miniCart.gql.js +3 -2
- package/lib/components/MiniCart/miniCart.js +9 -4
- package/lib/components/MyAccount/ResetPassword/resetPassword.gql.js +1 -1
- package/lib/components/Newsletter/__tests__/__snapshots__/newsletter.shimmer.spec.js.snap +40 -0
- package/lib/components/Newsletter/__tests__/__snapshots__/newsletter.spec.js.snap +14 -8
- package/lib/components/Newsletter/__tests__/newsletter.shimmer.spec.js +10 -0
- package/lib/components/Newsletter/__tests__/newsletter.spec.js +25 -2
- package/lib/components/Newsletter/newsletter.js +27 -6
- package/lib/components/Newsletter/newsletter.shimmer.js +46 -0
- package/lib/components/Newsletter/newsletter.shimmer.module.css +11 -0
- package/lib/components/OrderHistoryPage/OrderDetails/__tests__/__snapshots__/item.spec.js.snap +1 -1
- package/lib/components/OrderHistoryPage/OrderDetails/__tests__/__snapshots__/shippingMethod.spec.js.snap +3 -0
- package/lib/components/OrderHistoryPage/OrderDetails/billingInformation.js +4 -1
- package/lib/components/OrderHistoryPage/OrderDetails/item.js +1 -1
- package/lib/components/OrderHistoryPage/OrderDetails/items.js +1 -1
- package/lib/components/OrderHistoryPage/OrderDetails/paymentMethod.js +1 -1
- package/lib/components/OrderHistoryPage/OrderDetails/shippingInformation.js +4 -1
- package/lib/components/OrderHistoryPage/OrderDetails/shippingMethod.js +5 -1
- package/lib/components/OrderHistoryPage/orderHistoryPage.js +8 -1
- package/lib/components/Pagination/pagination.js +1 -1
- package/lib/components/Pagination/tile.js +5 -1
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Boolean/__tests__/__snapshots__/boolean.spec.js.snap +20 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Boolean/__tests__/boolean.spec.js +52 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Boolean/boolean.js +74 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Boolean/boolean.module.css +9 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Boolean/index.js +1 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Date/__tests__/__snapshots__/date.spec.js.snap +25 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Date/__tests__/date.spec.js +52 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Date/date.js +82 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Date/date.module.css +9 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Date/index.js +1 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/DateTime/__tests__/__snapshots__/dateTime.spec.js.snap +29 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/DateTime/__tests__/dateTime.spec.js +53 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/DateTime/dateTime.js +85 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/DateTime/dateTime.module.css +9 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/DateTime/index.js +1 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Multiselect/__tests__/__snapshots__/multiSelect.spec.js.snap +36 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Multiselect/__tests__/multiSelect.spec.js +88 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Multiselect/index.js +1 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Multiselect/multiselect.js +99 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Multiselect/multiselect.module.css +13 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Price/__tests__/__snapshots__/price.spec.js.snap +23 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Price/__tests__/price.spec.js +52 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Price/index.js +1 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Price/price.js +74 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Price/price.module.css +9 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Select/__tests__/__snapshots__/select.spec.js.snap +36 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Select/__tests__/select.spec.js +88 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Select/index.js +1 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Select/select.js +99 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Select/select.module.css +13 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Text/__tests__/__snapshots__/text.spec.js.snap +33 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Text/__tests__/text.spec.js +74 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Text/index.js +1 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Text/text.js +88 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Text/text.module.css +13 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Textarea/__tests__/__snapshots__/textarea.spec.js.snap +33 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Textarea/__tests__/textarea.spec.js +74 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Textarea/index.js +1 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Textarea/textarea.js +88 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Textarea/textarea.module.css +13 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/__tests__/__snapshots__/attributeType.spec.js.snap +101 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/__tests__/attributeType.spec.js +173 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/attributeType.js +61 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/index.js +1 -0
- package/lib/components/ProductFullDetail/CustomAttributes/__tests__/__snapshots__/customAttributes.spec.js.snap +49 -0
- package/lib/components/ProductFullDetail/CustomAttributes/__tests__/customAttributes.spec.js +78 -0
- package/lib/components/ProductFullDetail/CustomAttributes/customAttributes.js +66 -0
- package/lib/components/ProductFullDetail/CustomAttributes/customAttributes.module.css +14 -0
- package/lib/components/ProductFullDetail/CustomAttributes/index.js +1 -0
- package/lib/components/ProductFullDetail/__tests__/__snapshots__/productFullDetail.spec.js.snap +39 -0
- package/lib/components/ProductFullDetail/__tests__/productFullDetail.spec.js +3 -1
- package/lib/components/ProductFullDetail/productFullDetail.js +18 -3
- package/lib/components/ProductOptions/__tests__/__snapshots__/option.spec.js.snap +1 -1
- package/lib/components/ProductOptions/__tests__/__snapshots__/options.spec.js.snap +2 -2
- package/lib/components/ProductOptions/__tests__/__snapshots__/swatch.spec.js.snap +44 -2
- package/lib/components/ProductOptions/__tests__/__snapshots__/swatchList.spec.js.snap +22 -1
- package/lib/components/ProductOptions/__tests__/swatch.spec.js +0 -2
- package/lib/components/ProductOptions/option.js +2 -2
- package/lib/components/ProductOptions/swatch.js +7 -5
- package/lib/components/ProductOptions/swatch.module.css +11 -0
- package/lib/components/ProductOptions/tile.js +1 -0
- package/lib/components/ProductSort/__tests__/__snapshots__/sortItem.spec.js.snap +14 -0
- package/lib/components/ProductSort/__tests__/sortItem.spec.js +61 -0
- package/lib/components/ProductSort/productSort.js +84 -40
- package/lib/components/ProductSort/sortItem.js +26 -11
- package/lib/components/RadioGroup/radio.module.css +13 -5
- package/lib/components/RadioGroup/radioGroup.js +2 -1
- package/lib/components/Rating/__tests__/__snapshots__/rating.spec.js.snap +27 -0
- package/lib/components/Rating/__tests__/rating.spec.js +13 -0
- package/lib/components/Rating/index.js +1 -0
- package/lib/components/Rating/rating.js +30 -0
- package/lib/components/Rating/rating.module.css +21 -0
- package/lib/components/RichContent/richContent.module.css +52 -59
- package/lib/components/SearchBar/autocomplete.js +2 -0
- package/lib/components/SearchBar/searchBar.js +1 -1
- package/lib/components/SearchBar/searchField.js +1 -0
- package/lib/components/SearchBar/suggestedCategory.js +1 -1
- package/lib/components/SearchBar/suggestedProduct.js +6 -1
- package/lib/components/SearchPage/__tests__/__snapshots__/searchPage.spec.js.snap +41 -1
- package/lib/components/SearchPage/__tests__/searchPage.spec.js +8 -0
- package/lib/components/SearchPage/searchPage.js +12 -6
- package/lib/components/Shimmer/shimmer.js +11 -2
- package/lib/components/Shimmer/shimmer.module.css +4 -8
- package/lib/components/SignIn/__tests__/__snapshots__/signIn.spec.js.snap +126 -0
- package/lib/components/SignIn/__tests__/signIn.spec.js +11 -0
- package/lib/components/SignIn/signIn.gql.js +8 -4
- package/lib/components/SignIn/signIn.js +24 -4
- package/lib/components/TextArea/textArea.module.css +9 -0
- package/lib/components/TextInput/textInput.module.css +4 -0
- package/lib/components/ToastContainer/toast.js +23 -3
- package/lib/components/ToastContainer/toast.module.css +3 -0
- package/lib/components/Trigger/trigger.js +9 -2
- package/lib/components/Wishlist/AddToListButton/addToListButton.ee.js +1 -0
- package/lib/components/Wishlist/WishlistDialog/CreateWishlistForm/createWishlistForm.js +2 -0
- package/lib/components/Wishlist/WishlistDialog/WishlistLineItem/wishlistLineItem.js +1 -0
- package/lib/components/Wishlist/WishlistDialog/wishlistDialog.js +1 -0
- package/lib/components/WishlistPage/__tests__/__snapshots__/wishlistPage.spec.js.snap +5 -5
- package/lib/components/WishlistPage/createWishlist.ee.js +2 -0
- package/lib/components/WishlistPage/wishlist.js +8 -3
- package/lib/components/WishlistPage/wishlistItem.js +17 -4
- package/lib/components/WishlistPage/wishlistPage.js +5 -3
- package/lib/defaultRoutes.json +6 -0
- package/lib/targets/__tests__/venia-ui-targets.spec.js +2 -0
- package/lib/util/__tests__/shrinkGETQuery.spec.js +1 -1
- package/lib/util/apolloCache.js +2 -2
- package/lib/util/formValidators.js +10 -8
- package/lib/util/toCamelCase.js +3 -0
- package/package.json +17 -14
- package/upward.yml +19 -40
|
@@ -257,3 +257,129 @@ exports[`renders correctly 1`] = `
|
|
|
257
257
|
</form>
|
|
258
258
|
</div>
|
|
259
259
|
`;
|
|
260
|
+
|
|
261
|
+
exports[`renders prefilled form with initial values 1`] = `
|
|
262
|
+
<div
|
|
263
|
+
className="root"
|
|
264
|
+
>
|
|
265
|
+
<span
|
|
266
|
+
className="title"
|
|
267
|
+
>
|
|
268
|
+
<mock-FormattedMessage
|
|
269
|
+
defaultMessage="Sign-in to Your Account"
|
|
270
|
+
id="signIn.titleText"
|
|
271
|
+
/>
|
|
272
|
+
</span>
|
|
273
|
+
<FormError
|
|
274
|
+
errors={
|
|
275
|
+
Array [
|
|
276
|
+
null,
|
|
277
|
+
null,
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
/>
|
|
281
|
+
<form
|
|
282
|
+
className="form"
|
|
283
|
+
onKeyDown={[Function]}
|
|
284
|
+
onReset={[Function]}
|
|
285
|
+
onSubmit={[Function]}
|
|
286
|
+
>
|
|
287
|
+
<div
|
|
288
|
+
className="root"
|
|
289
|
+
>
|
|
290
|
+
<label
|
|
291
|
+
className="label"
|
|
292
|
+
>
|
|
293
|
+
Email address
|
|
294
|
+
</label>
|
|
295
|
+
<span
|
|
296
|
+
className="root"
|
|
297
|
+
style={
|
|
298
|
+
Object {
|
|
299
|
+
"--iconsAfter": 0,
|
|
300
|
+
"--iconsBefore": 0,
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
>
|
|
304
|
+
<span
|
|
305
|
+
className="input"
|
|
306
|
+
>
|
|
307
|
+
<input
|
|
308
|
+
autoComplete="email"
|
|
309
|
+
className="input"
|
|
310
|
+
id="email"
|
|
311
|
+
name="email"
|
|
312
|
+
onBlur={[Function]}
|
|
313
|
+
onChange={[Function]}
|
|
314
|
+
value="test@mail.com"
|
|
315
|
+
/>
|
|
316
|
+
</span>
|
|
317
|
+
<span
|
|
318
|
+
className="before"
|
|
319
|
+
/>
|
|
320
|
+
<span
|
|
321
|
+
className="after"
|
|
322
|
+
/>
|
|
323
|
+
</span>
|
|
324
|
+
<p
|
|
325
|
+
className="root"
|
|
326
|
+
/>
|
|
327
|
+
</div>
|
|
328
|
+
<div
|
|
329
|
+
className="root"
|
|
330
|
+
>
|
|
331
|
+
<label
|
|
332
|
+
className="label"
|
|
333
|
+
>
|
|
334
|
+
Password
|
|
335
|
+
</label>
|
|
336
|
+
<span
|
|
337
|
+
className="root"
|
|
338
|
+
style={
|
|
339
|
+
Object {
|
|
340
|
+
"--iconsAfter": 1,
|
|
341
|
+
"--iconsBefore": 0,
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
>
|
|
345
|
+
<span
|
|
346
|
+
className="input"
|
|
347
|
+
>
|
|
348
|
+
<input
|
|
349
|
+
autoComplete="current-password"
|
|
350
|
+
className="input"
|
|
351
|
+
id="password"
|
|
352
|
+
name="password"
|
|
353
|
+
onBlur={[Function]}
|
|
354
|
+
onChange={[Function]}
|
|
355
|
+
type="password"
|
|
356
|
+
value=""
|
|
357
|
+
/>
|
|
358
|
+
</span>
|
|
359
|
+
<span
|
|
360
|
+
className="before"
|
|
361
|
+
/>
|
|
362
|
+
<span
|
|
363
|
+
className="after"
|
|
364
|
+
>
|
|
365
|
+
<i />
|
|
366
|
+
</span>
|
|
367
|
+
</span>
|
|
368
|
+
<p
|
|
369
|
+
className="root"
|
|
370
|
+
/>
|
|
371
|
+
</div>
|
|
372
|
+
<div
|
|
373
|
+
className="forgotPasswordButtonContainer"
|
|
374
|
+
>
|
|
375
|
+
<i />
|
|
376
|
+
</div>
|
|
377
|
+
<div
|
|
378
|
+
className="buttonsContainer"
|
|
379
|
+
>
|
|
380
|
+
<i />
|
|
381
|
+
<i />
|
|
382
|
+
</div>
|
|
383
|
+
</form>
|
|
384
|
+
</div>
|
|
385
|
+
`;
|
|
@@ -91,6 +91,17 @@ test('renders the loading indicator when form is submitting', () => {
|
|
|
91
91
|
});
|
|
92
92
|
});
|
|
93
93
|
|
|
94
|
+
test('renders prefilled form with initial values', () => {
|
|
95
|
+
const testProps = {
|
|
96
|
+
...props,
|
|
97
|
+
initialValues: {
|
|
98
|
+
email: 'test@mail.com'
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
const component = createTestInstance(<SignIn {...testProps} />);
|
|
102
|
+
expect(component.toJSON()).toMatchSnapshot();
|
|
103
|
+
});
|
|
104
|
+
|
|
94
105
|
test('displays an error message if there is a sign in error', () => {
|
|
95
106
|
useMutation.mockReturnValueOnce([
|
|
96
107
|
jest.fn(),
|
|
@@ -5,10 +5,12 @@ export const GET_CART_DETAILS_QUERY = gql`
|
|
|
5
5
|
query GetCartDetailsAfterSignIn($cartId: String!) {
|
|
6
6
|
cart(cart_id: $cartId) {
|
|
7
7
|
id
|
|
8
|
+
# eslint-disable-next-line @graphql-eslint/require-id-when-available
|
|
8
9
|
items {
|
|
9
|
-
|
|
10
|
+
uid
|
|
11
|
+
# eslint-disable-next-line @graphql-eslint/require-id-when-available
|
|
10
12
|
product {
|
|
11
|
-
|
|
13
|
+
uid
|
|
12
14
|
name
|
|
13
15
|
sku
|
|
14
16
|
small_image {
|
|
@@ -24,11 +26,13 @@ export const GET_CART_DETAILS_QUERY = gql`
|
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
28
|
quantity
|
|
29
|
+
# eslint-disable-next-line @graphql-eslint/require-id-when-available
|
|
27
30
|
... on ConfigurableCartItem {
|
|
31
|
+
# eslint-disable-next-line @graphql-eslint/require-id-when-available
|
|
28
32
|
configurable_options {
|
|
29
|
-
|
|
33
|
+
configurable_product_option_uid
|
|
30
34
|
option_label
|
|
31
|
-
|
|
35
|
+
configurable_product_option_value_uid
|
|
32
36
|
value_label
|
|
33
37
|
}
|
|
34
38
|
}
|
|
@@ -18,7 +18,12 @@ import FormError from '../FormError/formError';
|
|
|
18
18
|
|
|
19
19
|
const SignIn = props => {
|
|
20
20
|
const classes = useStyle(defaultClasses, props.classes);
|
|
21
|
-
const {
|
|
21
|
+
const {
|
|
22
|
+
setDefaultUsername,
|
|
23
|
+
showCreateAccount,
|
|
24
|
+
showForgotPassword,
|
|
25
|
+
initialValues
|
|
26
|
+
} = props;
|
|
22
27
|
|
|
23
28
|
const { formatMessage } = useIntl();
|
|
24
29
|
const talonProps = useSignIn({
|
|
@@ -55,7 +60,7 @@ const SignIn = props => {
|
|
|
55
60
|
};
|
|
56
61
|
|
|
57
62
|
return (
|
|
58
|
-
<div className={classes.root}>
|
|
63
|
+
<div data-cy="SignIn-root" className={classes.root}>
|
|
59
64
|
<span className={classes.title}>
|
|
60
65
|
<FormattedMessage
|
|
61
66
|
id={'signIn.titleText'}
|
|
@@ -67,6 +72,8 @@ const SignIn = props => {
|
|
|
67
72
|
getApi={setFormApi}
|
|
68
73
|
className={classes.form}
|
|
69
74
|
onSubmit={handleSubmit}
|
|
75
|
+
data-cy="SignIn-form"
|
|
76
|
+
initialValues={initialValues && initialValues}
|
|
70
77
|
>
|
|
71
78
|
<Field
|
|
72
79
|
label={formatMessage({
|
|
@@ -75,12 +82,15 @@ const SignIn = props => {
|
|
|
75
82
|
})}
|
|
76
83
|
>
|
|
77
84
|
<TextInput
|
|
85
|
+
data-cy="SignIn-email"
|
|
78
86
|
autoComplete="email"
|
|
79
87
|
field="email"
|
|
80
88
|
validate={isRequired}
|
|
89
|
+
data-cy="email"
|
|
81
90
|
/>
|
|
82
91
|
</Field>
|
|
83
92
|
<Password
|
|
93
|
+
data-cy="SignIn-password"
|
|
84
94
|
fieldName="password"
|
|
85
95
|
label={formatMessage({
|
|
86
96
|
id: 'signIn.passwordText',
|
|
@@ -89,12 +99,14 @@ const SignIn = props => {
|
|
|
89
99
|
validate={isRequired}
|
|
90
100
|
autoComplete="current-password"
|
|
91
101
|
isToggleButtonHidden={false}
|
|
102
|
+
data-cy="password"
|
|
92
103
|
/>
|
|
93
104
|
<div className={classes.forgotPasswordButtonContainer}>
|
|
94
105
|
<LinkButton
|
|
95
106
|
classes={forgotPasswordClasses}
|
|
96
107
|
type="button"
|
|
97
108
|
onClick={handleForgotPassword}
|
|
109
|
+
data-cy="SignIn-forgotPasswordButton"
|
|
98
110
|
>
|
|
99
111
|
<FormattedMessage
|
|
100
112
|
id={'signIn.forgotPasswordText'}
|
|
@@ -103,7 +115,11 @@ const SignIn = props => {
|
|
|
103
115
|
</LinkButton>
|
|
104
116
|
</div>
|
|
105
117
|
<div className={classes.buttonsContainer}>
|
|
106
|
-
<Button
|
|
118
|
+
<Button
|
|
119
|
+
priority="high"
|
|
120
|
+
type="submit"
|
|
121
|
+
data-cy="SignInButton-root_highPriority"
|
|
122
|
+
>
|
|
107
123
|
<FormattedMessage
|
|
108
124
|
id={'signIn.signInText'}
|
|
109
125
|
defaultMessage={'Sign In'}
|
|
@@ -113,6 +129,7 @@ const SignIn = props => {
|
|
|
113
129
|
priority="normal"
|
|
114
130
|
type="button"
|
|
115
131
|
onClick={handleCreateAccount}
|
|
132
|
+
data-cy="CreateAccount-initiateButton"
|
|
116
133
|
>
|
|
117
134
|
<FormattedMessage
|
|
118
135
|
id={'signIn.createAccountText'}
|
|
@@ -137,7 +154,10 @@ SignIn.propTypes = {
|
|
|
137
154
|
}),
|
|
138
155
|
setDefaultUsername: func,
|
|
139
156
|
showCreateAccount: func,
|
|
140
|
-
showForgotPassword: func
|
|
157
|
+
showForgotPassword: func,
|
|
158
|
+
initialValues: shape({
|
|
159
|
+
email: string.isRequired
|
|
160
|
+
})
|
|
141
161
|
};
|
|
142
162
|
SignIn.defaultProps = {
|
|
143
163
|
setDefaultUsername: () => {},
|
|
@@ -10,6 +10,8 @@ const Toast = props => {
|
|
|
10
10
|
const {
|
|
11
11
|
actionText,
|
|
12
12
|
dismissable,
|
|
13
|
+
hasDismissAction,
|
|
14
|
+
dismissActionText,
|
|
13
15
|
icon,
|
|
14
16
|
message,
|
|
15
17
|
onAction,
|
|
@@ -30,18 +32,36 @@ const Toast = props => {
|
|
|
30
32
|
</button>
|
|
31
33
|
) : null;
|
|
32
34
|
|
|
35
|
+
const dismissActionButton =
|
|
36
|
+
hasDismissAction && (onDismiss || dismissable) ? (
|
|
37
|
+
<button
|
|
38
|
+
data-cy="Toast-dismissActionButton"
|
|
39
|
+
className={classes.actionButton}
|
|
40
|
+
onClick={handleDismiss}
|
|
41
|
+
>
|
|
42
|
+
{dismissActionText}
|
|
43
|
+
</button>
|
|
44
|
+
) : null;
|
|
45
|
+
|
|
33
46
|
const actions = onAction ? (
|
|
34
47
|
<div className={classes.actions}>
|
|
35
|
-
|
|
48
|
+
{dismissActionButton}
|
|
49
|
+
<button
|
|
50
|
+
data-cy="Toast-actionButton"
|
|
51
|
+
className={classes.actionButton}
|
|
52
|
+
onClick={handleAction}
|
|
53
|
+
>
|
|
36
54
|
{actionText}
|
|
37
55
|
</button>
|
|
38
56
|
</div>
|
|
39
57
|
) : null;
|
|
40
58
|
|
|
41
59
|
return (
|
|
42
|
-
<div className={classes[`${type}Toast`]}>
|
|
60
|
+
<div className={classes[`${type}Toast`]} data-cy="Toast-root">
|
|
43
61
|
<span className={classes.icon}>{iconElement}</span>
|
|
44
|
-
<div className={classes.message}
|
|
62
|
+
<div className={classes.message} data-cy="Toast-message">
|
|
63
|
+
{message}
|
|
64
|
+
</div>
|
|
45
65
|
<div className={classes.controls}>{controls}</div>
|
|
46
66
|
{actions}
|
|
47
67
|
</div>
|
|
@@ -15,9 +15,15 @@ import defaultClasses from './trigger.module.css';
|
|
|
15
15
|
* @returns {React.Element} A React component that when triggered invokes the action.
|
|
16
16
|
*/
|
|
17
17
|
const Trigger = props => {
|
|
18
|
-
const {
|
|
18
|
+
const {
|
|
19
|
+
action,
|
|
20
|
+
children,
|
|
21
|
+
ariaLabel,
|
|
22
|
+
classes: propClasses,
|
|
23
|
+
...restProps
|
|
24
|
+
} = props;
|
|
19
25
|
|
|
20
|
-
const classes = useStyle(defaultClasses,
|
|
26
|
+
const classes = useStyle(defaultClasses, propClasses);
|
|
21
27
|
|
|
22
28
|
return (
|
|
23
29
|
<button
|
|
@@ -25,6 +31,7 @@ const Trigger = props => {
|
|
|
25
31
|
type="button"
|
|
26
32
|
onClick={action}
|
|
27
33
|
aria-label={ariaLabel}
|
|
34
|
+
{...restProps}
|
|
28
35
|
>
|
|
29
36
|
{children}
|
|
30
37
|
</button>
|
|
@@ -48,6 +48,7 @@ const CreateWishlistForm = props => {
|
|
|
48
48
|
id={classes.listname}
|
|
49
49
|
field="listname"
|
|
50
50
|
validate={isRequired}
|
|
51
|
+
data-cy="createWishlistForm-listname"
|
|
51
52
|
/>
|
|
52
53
|
</Field>
|
|
53
54
|
</div>
|
|
@@ -61,6 +62,7 @@ const CreateWishlistForm = props => {
|
|
|
61
62
|
onClick={handleSave}
|
|
62
63
|
priority="high"
|
|
63
64
|
type="button"
|
|
65
|
+
data-cy="createWishListForm-saveButton"
|
|
64
66
|
>
|
|
65
67
|
{saveButtonText}
|
|
66
68
|
</Button>
|
|
@@ -8,7 +8,7 @@ exports[`empty single wishlist 1`] = `
|
|
|
8
8
|
className="heading"
|
|
9
9
|
>
|
|
10
10
|
<mock-FormattedMessage
|
|
11
|
-
defaultMessage="Favorites Lists"
|
|
11
|
+
defaultMessage="{count, plural, one {Favorites List} other {Favorites Lists}}"
|
|
12
12
|
id="wishlistPage.headingText"
|
|
13
13
|
values={
|
|
14
14
|
Object {
|
|
@@ -30,7 +30,7 @@ exports[`renders a single wishlist without visibility toggle 1`] = `
|
|
|
30
30
|
className="heading"
|
|
31
31
|
>
|
|
32
32
|
<mock-FormattedMessage
|
|
33
|
-
defaultMessage="Favorites Lists"
|
|
33
|
+
defaultMessage="{count, plural, one {Favorites List} other {Favorites Lists}}"
|
|
34
34
|
id="wishlistPage.headingText"
|
|
35
35
|
values={
|
|
36
36
|
Object {
|
|
@@ -60,7 +60,7 @@ exports[`renders disabled feature error 1`] = `
|
|
|
60
60
|
className="heading"
|
|
61
61
|
>
|
|
62
62
|
<mock-FormattedMessage
|
|
63
|
-
defaultMessage="Favorites Lists"
|
|
63
|
+
defaultMessage="{count, plural, one {Favorites List} other {Favorites Lists}}"
|
|
64
64
|
id="wishlistPage.headingText"
|
|
65
65
|
values={
|
|
66
66
|
Object {
|
|
@@ -90,7 +90,7 @@ exports[`renders general fetch error 1`] = `
|
|
|
90
90
|
className="heading"
|
|
91
91
|
>
|
|
92
92
|
<mock-FormattedMessage
|
|
93
|
-
defaultMessage="Favorites Lists"
|
|
93
|
+
defaultMessage="{count, plural, one {Favorites List} other {Favorites Lists}}"
|
|
94
94
|
id="wishlistPage.headingText"
|
|
95
95
|
values={
|
|
96
96
|
Object {
|
|
@@ -202,7 +202,7 @@ exports[`renders wishlist data 1`] = `
|
|
|
202
202
|
className="heading"
|
|
203
203
|
>
|
|
204
204
|
<mock-FormattedMessage
|
|
205
|
-
defaultMessage="Favorites Lists"
|
|
205
|
+
defaultMessage="{count, plural, one {Favorites List} other {Favorites Lists}}"
|
|
206
206
|
id="wishlistPage.headingText"
|
|
207
207
|
values={
|
|
208
208
|
Object {
|
|
@@ -47,6 +47,7 @@ const CreateWishlist = props => {
|
|
|
47
47
|
className={classes.createButton}
|
|
48
48
|
onClick={handleShowModal}
|
|
49
49
|
type="button"
|
|
50
|
+
data-cy="createWishlist-createButton"
|
|
50
51
|
>
|
|
51
52
|
<div className={classes.labelContainer}>
|
|
52
53
|
{createIcon}
|
|
@@ -99,6 +100,7 @@ const CreateWishlist = props => {
|
|
|
99
100
|
field="name"
|
|
100
101
|
validate={isRequired}
|
|
101
102
|
validateOnBlur
|
|
103
|
+
data-cy="createWishlist-name"
|
|
102
104
|
/>
|
|
103
105
|
</Field>
|
|
104
106
|
</div>
|
|
@@ -91,7 +91,9 @@ const Wishlist = props => {
|
|
|
91
91
|
|
|
92
92
|
const wishlistName = name ? (
|
|
93
93
|
<div className={classes.nameContainer}>
|
|
94
|
-
<h2 className={classes.name}
|
|
94
|
+
<h2 className={classes.name} data-cy="Wishlist-name">
|
|
95
|
+
{name}
|
|
96
|
+
</h2>
|
|
95
97
|
</div>
|
|
96
98
|
) : (
|
|
97
99
|
<div className={classes.nameContainer}>
|
|
@@ -127,7 +129,10 @@ const Wishlist = props => {
|
|
|
127
129
|
: classes.visibilityToggle_hidden;
|
|
128
130
|
|
|
129
131
|
const buttonsContainer = id ? (
|
|
130
|
-
<div
|
|
132
|
+
<div
|
|
133
|
+
className={classes.buttonsContainer}
|
|
134
|
+
data-cy="wishlist-buttonsContainer"
|
|
135
|
+
>
|
|
131
136
|
<ActionMenu id={id} name={name} visibility={visibility} />
|
|
132
137
|
<button
|
|
133
138
|
className={visibilityToggleClass}
|
|
@@ -140,7 +145,7 @@ const Wishlist = props => {
|
|
|
140
145
|
) : null;
|
|
141
146
|
|
|
142
147
|
return (
|
|
143
|
-
<div className={classes.root}>
|
|
148
|
+
<div className={classes.root} data-cy="Wishlist-root">
|
|
144
149
|
<div className={classes.header}>
|
|
145
150
|
{wishlistName}
|
|
146
151
|
<div className={classes.itemsCountContainer}>
|
|
@@ -91,7 +91,11 @@ const WishlistItem = props => {
|
|
|
91
91
|
: classes.root;
|
|
92
92
|
|
|
93
93
|
const addToCart = isSupportedProductType ? (
|
|
94
|
-
<button
|
|
94
|
+
<button
|
|
95
|
+
className={classes.addToCart}
|
|
96
|
+
{...addToCartButtonProps}
|
|
97
|
+
data-cy="wishlistItem-addToCart"
|
|
98
|
+
>
|
|
95
99
|
{formatMessage({
|
|
96
100
|
id: 'wishlistItem.addToCart',
|
|
97
101
|
defaultMessage: 'Add to Cart'
|
|
@@ -100,20 +104,29 @@ const WishlistItem = props => {
|
|
|
100
104
|
) : null;
|
|
101
105
|
|
|
102
106
|
return (
|
|
103
|
-
<div className={rootClass}>
|
|
107
|
+
<div className={rootClass} data-cy="wishlistItem-root">
|
|
104
108
|
<Image {...imageProps} />
|
|
105
109
|
|
|
106
110
|
<div className={classes.actionWrap}>
|
|
107
|
-
<span
|
|
111
|
+
<span
|
|
112
|
+
className={classes.name}
|
|
113
|
+
data-cy="wishlistItem-productName"
|
|
114
|
+
>
|
|
115
|
+
{name}
|
|
116
|
+
</span>{' '}
|
|
108
117
|
<button
|
|
109
118
|
className={classes.deleteItem}
|
|
110
119
|
onClick={handleRemoveProductFromWishlist}
|
|
111
120
|
aria-label={removeProductAriaLabel}
|
|
121
|
+
data-cy="wishlistItem-deleteItem"
|
|
112
122
|
>
|
|
113
123
|
<Icon size={16} src={Trash2} />
|
|
114
124
|
</button>
|
|
115
125
|
</div>
|
|
116
|
-
<div
|
|
126
|
+
<div
|
|
127
|
+
className={classes.priceContainer}
|
|
128
|
+
data-cy="wishlistItem-priceContainer"
|
|
129
|
+
>
|
|
117
130
|
<Price currencyCode={currency} value={unitPrice} />
|
|
118
131
|
</div>
|
|
119
132
|
{optionElements}
|
|
@@ -80,12 +80,14 @@ const WishlistPage = props => {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
return (
|
|
83
|
-
<div className={classes.root}>
|
|
84
|
-
<h1 className={classes.heading}>
|
|
83
|
+
<div className={classes.root} data-cy="Wishlist-root">
|
|
84
|
+
<h1 className={classes.heading} data-cy="WishlistPage-heading">
|
|
85
85
|
<FormattedMessage
|
|
86
86
|
values={{ count: wishlists.length }}
|
|
87
87
|
id={'wishlistPage.headingText'}
|
|
88
|
-
defaultMessage={
|
|
88
|
+
defaultMessage={
|
|
89
|
+
'{count, plural, one {Favorites List} other {Favorites Lists}}'
|
|
90
|
+
}
|
|
89
91
|
/>
|
|
90
92
|
</h1>
|
|
91
93
|
{content}
|
package/lib/defaultRoutes.json
CHANGED
|
@@ -85,6 +85,7 @@ test('uses routes to inject client-routed pages', async () => {
|
|
|
85
85
|
'../CartPage/index.js': mockDefault('Cart'),
|
|
86
86
|
'../CreateAccountPage/index.js': mockDefault('CreateAccount'),
|
|
87
87
|
'../CheckoutPage/index.js': mockDefault('Checkout'),
|
|
88
|
+
'../ContactPage/index.js': mockDefault('ContactPage'),
|
|
88
89
|
'../MagentoRoute/index.js': mockDefault('MagentoRoute')
|
|
89
90
|
},
|
|
90
91
|
optimization: {
|
|
@@ -97,6 +98,7 @@ test('uses routes to inject client-routed pages', async () => {
|
|
|
97
98
|
expect(built.bundle).toContain('DynamicCart');
|
|
98
99
|
expect(built.bundle).toContain('DynamicCreateAccount');
|
|
99
100
|
expect(built.bundle).toContain('DynamicCheckout');
|
|
101
|
+
expect(built.bundle).toContain('DynamicContactPage');
|
|
100
102
|
});
|
|
101
103
|
|
|
102
104
|
test('declares checkoutPagePaymentTypes target', async () => {
|
package/lib/util/apolloCache.js
CHANGED
|
@@ -50,9 +50,9 @@ export const cacheKeyFromType = object => {
|
|
|
50
50
|
: defaultDataIdFromObject(object);
|
|
51
51
|
// ID field is not based on selected values and is not unique; use unique value ID instead.
|
|
52
52
|
case MagentoGraphQLTypes.SelectedConfigurableOption:
|
|
53
|
-
return object.
|
|
53
|
+
return object.configurable_product_option_value_uid
|
|
54
54
|
? `${MagentoGraphQLTypes.SelectedConfigurableOption}:${
|
|
55
|
-
object.
|
|
55
|
+
object.configurable_product_option_value_uid
|
|
56
56
|
}`
|
|
57
57
|
: null;
|
|
58
58
|
// Only maintain a single cart entry
|