@magento/venia-ui 9.0.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 +21 -1
- 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 +11 -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 +17 -10
- 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 +15 -0
- package/lib/components/Footer/__tests__/footer.spec.js +13 -1
- package/lib/components/Footer/footer.js +17 -8
- package/lib/components/Footer/footer.module.css +18 -3
- 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 +27 -22
- package/lib/components/Gallery/item.js +16 -4
- package/lib/components/Gallery/item.module.css +3 -1
- 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/currencySwitcher.module.css +1 -1
- package/lib/components/Header/header.js +1 -1
- package/lib/components/Header/header.module.css +100 -96
- package/lib/components/Header/navTrigger.js +1 -0
- package/lib/components/Header/searchTrigger.js +1 -0
- package/lib/components/LegacyMiniCart/cartOptions.gql.js +7 -6
- package/lib/components/LegacyMiniCart/cartOptions.js +1 -1
- package/lib/components/LegacyMiniCart/editFormFragment.gql.js +7 -3
- package/lib/components/LegacyMiniCart/kebab.js +1 -0
- package/lib/components/LegacyMiniCart/product.js +1 -1
- 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/megaMenu.module.css +8 -11
- 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 +7 -4
- 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 +4 -3
- 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 +173 -0
- package/lib/components/Newsletter/__tests__/newsletter.shimmer.spec.js +10 -0
- package/lib/components/Newsletter/__tests__/newsletter.spec.js +143 -0
- package/lib/components/Newsletter/index.js +1 -0
- package/lib/components/Newsletter/newsletter.js +148 -0
- package/lib/components/Newsletter/newsletter.module.css +94 -0
- 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/searchBar.module.css +1 -0
- 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 +195 -1
- package/lib/components/SearchPage/__tests__/searchPage.spec.js +13 -0
- package/lib/components/SearchPage/searchPage.js +20 -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
|
@@ -55,6 +55,17 @@ exports[`Search Page Component error view does not render when data is present 1
|
|
|
55
55
|
/>
|
|
56
56
|
</section>
|
|
57
57
|
</div>
|
|
58
|
+
<Title>
|
|
59
|
+
Venia Search
|
|
60
|
+
</Title>
|
|
61
|
+
<Meta
|
|
62
|
+
content="Venia Search"
|
|
63
|
+
name="title"
|
|
64
|
+
/>
|
|
65
|
+
<Meta
|
|
66
|
+
content="Venia Search"
|
|
67
|
+
name="description"
|
|
68
|
+
/>
|
|
58
69
|
</article>
|
|
59
70
|
`;
|
|
60
71
|
|
|
@@ -87,6 +98,17 @@ exports[`Search Page Component error view renders when data is not present and n
|
|
|
87
98
|
/>
|
|
88
99
|
</div>
|
|
89
100
|
</div>
|
|
101
|
+
<Title>
|
|
102
|
+
Venia Search
|
|
103
|
+
</Title>
|
|
104
|
+
<Meta
|
|
105
|
+
content="Venia Search"
|
|
106
|
+
name="title"
|
|
107
|
+
/>
|
|
108
|
+
<Meta
|
|
109
|
+
content="Venia Search"
|
|
110
|
+
name="description"
|
|
111
|
+
/>
|
|
90
112
|
</article>
|
|
91
113
|
`;
|
|
92
114
|
|
|
@@ -145,6 +167,17 @@ exports[`Search Page Component filter button/modal does not render if there are
|
|
|
145
167
|
/>
|
|
146
168
|
</section>
|
|
147
169
|
</div>
|
|
170
|
+
<Title>
|
|
171
|
+
Venia Search
|
|
172
|
+
</Title>
|
|
173
|
+
<Meta
|
|
174
|
+
content="Venia Search"
|
|
175
|
+
name="title"
|
|
176
|
+
/>
|
|
177
|
+
<Meta
|
|
178
|
+
content="Venia Search"
|
|
179
|
+
name="description"
|
|
180
|
+
/>
|
|
148
181
|
</article>
|
|
149
182
|
`;
|
|
150
183
|
|
|
@@ -226,6 +259,17 @@ exports[`Search Page Component filter button/modal renders when there are filter
|
|
|
226
259
|
}
|
|
227
260
|
/>
|
|
228
261
|
</div>
|
|
262
|
+
<Title>
|
|
263
|
+
Venia Search
|
|
264
|
+
</Title>
|
|
265
|
+
<Meta
|
|
266
|
+
content="Venia Search"
|
|
267
|
+
name="title"
|
|
268
|
+
/>
|
|
269
|
+
<Meta
|
|
270
|
+
content="Venia Search"
|
|
271
|
+
name="description"
|
|
272
|
+
/>
|
|
229
273
|
</article>
|
|
230
274
|
`;
|
|
231
275
|
|
|
@@ -284,6 +328,17 @@ exports[`Search Page Component loading indicator does not render when data is pr
|
|
|
284
328
|
/>
|
|
285
329
|
</section>
|
|
286
330
|
</div>
|
|
331
|
+
<Title>
|
|
332
|
+
Venia Search
|
|
333
|
+
</Title>
|
|
334
|
+
<Meta
|
|
335
|
+
content="Venia Search"
|
|
336
|
+
name="title"
|
|
337
|
+
/>
|
|
338
|
+
<Meta
|
|
339
|
+
content="Venia Search"
|
|
340
|
+
name="description"
|
|
341
|
+
/>
|
|
287
342
|
</article>
|
|
288
343
|
`;
|
|
289
344
|
|
|
@@ -343,6 +398,17 @@ exports[`Search Page Component loading indicator renders when data is not presen
|
|
|
343
398
|
className="pagination"
|
|
344
399
|
/>
|
|
345
400
|
</div>
|
|
401
|
+
<Title>
|
|
402
|
+
Venia Search
|
|
403
|
+
</Title>
|
|
404
|
+
<Meta
|
|
405
|
+
content="Venia Search"
|
|
406
|
+
name="title"
|
|
407
|
+
/>
|
|
408
|
+
<Meta
|
|
409
|
+
content="Venia Search"
|
|
410
|
+
name="description"
|
|
411
|
+
/>
|
|
346
412
|
</article>
|
|
347
413
|
`;
|
|
348
414
|
|
|
@@ -385,6 +451,17 @@ exports[`Search Page Component search results does not render if data returned h
|
|
|
385
451
|
/>
|
|
386
452
|
</div>
|
|
387
453
|
</div>
|
|
454
|
+
<Title>
|
|
455
|
+
Venia Search
|
|
456
|
+
</Title>
|
|
457
|
+
<Meta
|
|
458
|
+
content="Venia Search"
|
|
459
|
+
name="title"
|
|
460
|
+
/>
|
|
461
|
+
<Meta
|
|
462
|
+
content="Venia Search"
|
|
463
|
+
name="description"
|
|
464
|
+
/>
|
|
388
465
|
</article>
|
|
389
466
|
`;
|
|
390
467
|
|
|
@@ -418,6 +495,16 @@ exports[`Search Page Component search results heading renders a generic message
|
|
|
418
495
|
className="headerButtons"
|
|
419
496
|
>
|
|
420
497
|
<ProductSort
|
|
498
|
+
availableSortMethods={
|
|
499
|
+
Array [
|
|
500
|
+
Object {
|
|
501
|
+
"attribute": "position",
|
|
502
|
+
"id": "sortItem.positionAsc",
|
|
503
|
+
"sortDirection": "ASC",
|
|
504
|
+
"text": "Position Asc",
|
|
505
|
+
},
|
|
506
|
+
]
|
|
507
|
+
}
|
|
421
508
|
sortProps={
|
|
422
509
|
Array [
|
|
423
510
|
Object {
|
|
@@ -465,6 +552,17 @@ exports[`Search Page Component search results heading renders a generic message
|
|
|
465
552
|
/>
|
|
466
553
|
</section>
|
|
467
554
|
</div>
|
|
555
|
+
<Title>
|
|
556
|
+
Venia Search
|
|
557
|
+
</Title>
|
|
558
|
+
<Meta
|
|
559
|
+
content="Venia Search"
|
|
560
|
+
name="title"
|
|
561
|
+
/>
|
|
562
|
+
<Meta
|
|
563
|
+
content="Venia Search"
|
|
564
|
+
name="description"
|
|
565
|
+
/>
|
|
468
566
|
</article>
|
|
469
567
|
`;
|
|
470
568
|
|
|
@@ -485,7 +583,7 @@ exports[`Search Page Component search results heading renders a specific message
|
|
|
485
583
|
className="searchInfo"
|
|
486
584
|
>
|
|
487
585
|
<mock-FormattedMessage
|
|
488
|
-
defaultMessage="Showing results:"
|
|
586
|
+
defaultMessage="Showing results for <highlight>{term}</highlight>{category, select, null {} other { in <highlight>{category}</highlight>}}:"
|
|
489
587
|
id="searchPage.searchTerm"
|
|
490
588
|
values={
|
|
491
589
|
Object {
|
|
@@ -505,6 +603,16 @@ exports[`Search Page Component search results heading renders a specific message
|
|
|
505
603
|
className="headerButtons"
|
|
506
604
|
>
|
|
507
605
|
<ProductSort
|
|
606
|
+
availableSortMethods={
|
|
607
|
+
Array [
|
|
608
|
+
Object {
|
|
609
|
+
"attribute": "position",
|
|
610
|
+
"id": "sortItem.positionAsc",
|
|
611
|
+
"sortDirection": "ASC",
|
|
612
|
+
"text": "Position Asc",
|
|
613
|
+
},
|
|
614
|
+
]
|
|
615
|
+
}
|
|
508
616
|
sortProps={
|
|
509
617
|
Array [
|
|
510
618
|
Object {
|
|
@@ -552,6 +660,17 @@ exports[`Search Page Component search results heading renders a specific message
|
|
|
552
660
|
/>
|
|
553
661
|
</section>
|
|
554
662
|
</div>
|
|
663
|
+
<Title>
|
|
664
|
+
Search Term - Venia Search
|
|
665
|
+
</Title>
|
|
666
|
+
<Meta
|
|
667
|
+
content="Search Term - Venia Search"
|
|
668
|
+
name="title"
|
|
669
|
+
/>
|
|
670
|
+
<Meta
|
|
671
|
+
content="Search Term - Venia Search"
|
|
672
|
+
name="description"
|
|
673
|
+
/>
|
|
555
674
|
</article>
|
|
556
675
|
`;
|
|
557
676
|
|
|
@@ -610,6 +729,17 @@ exports[`Search Page Component search results renders if data has items 1`] = `
|
|
|
610
729
|
/>
|
|
611
730
|
</section>
|
|
612
731
|
</div>
|
|
732
|
+
<Title>
|
|
733
|
+
Venia Search
|
|
734
|
+
</Title>
|
|
735
|
+
<Meta
|
|
736
|
+
content="Venia Search"
|
|
737
|
+
name="title"
|
|
738
|
+
/>
|
|
739
|
+
<Meta
|
|
740
|
+
content="Venia Search"
|
|
741
|
+
name="description"
|
|
742
|
+
/>
|
|
613
743
|
</article>
|
|
614
744
|
`;
|
|
615
745
|
|
|
@@ -652,6 +782,17 @@ exports[`Search Page Component sort button/container does not render if total co
|
|
|
652
782
|
/>
|
|
653
783
|
</div>
|
|
654
784
|
</div>
|
|
785
|
+
<Title>
|
|
786
|
+
Venia Search
|
|
787
|
+
</Title>
|
|
788
|
+
<Meta
|
|
789
|
+
content="Venia Search"
|
|
790
|
+
name="title"
|
|
791
|
+
/>
|
|
792
|
+
<Meta
|
|
793
|
+
content="Venia Search"
|
|
794
|
+
name="description"
|
|
795
|
+
/>
|
|
655
796
|
</article>
|
|
656
797
|
`;
|
|
657
798
|
|
|
@@ -685,6 +826,16 @@ exports[`Search Page Component sort button/container renders when total count >
|
|
|
685
826
|
className="headerButtons"
|
|
686
827
|
>
|
|
687
828
|
<ProductSort
|
|
829
|
+
availableSortMethods={
|
|
830
|
+
Array [
|
|
831
|
+
Object {
|
|
832
|
+
"attribute": "position",
|
|
833
|
+
"id": "sortItem.positionAsc",
|
|
834
|
+
"sortDirection": "ASC",
|
|
835
|
+
"text": "Position Asc",
|
|
836
|
+
},
|
|
837
|
+
]
|
|
838
|
+
}
|
|
688
839
|
sortProps={
|
|
689
840
|
Array [
|
|
690
841
|
Object {
|
|
@@ -732,6 +883,17 @@ exports[`Search Page Component sort button/container renders when total count >
|
|
|
732
883
|
/>
|
|
733
884
|
</section>
|
|
734
885
|
</div>
|
|
886
|
+
<Title>
|
|
887
|
+
Venia Search
|
|
888
|
+
</Title>
|
|
889
|
+
<Meta
|
|
890
|
+
content="Venia Search"
|
|
891
|
+
name="title"
|
|
892
|
+
/>
|
|
893
|
+
<Meta
|
|
894
|
+
content="Venia Search"
|
|
895
|
+
name="description"
|
|
896
|
+
/>
|
|
735
897
|
</article>
|
|
736
898
|
`;
|
|
737
899
|
|
|
@@ -774,6 +936,17 @@ exports[`Search Page Component total count renders 0 items if data.products.tota
|
|
|
774
936
|
/>
|
|
775
937
|
</div>
|
|
776
938
|
</div>
|
|
939
|
+
<Title>
|
|
940
|
+
Venia Search
|
|
941
|
+
</Title>
|
|
942
|
+
<Meta
|
|
943
|
+
content="Venia Search"
|
|
944
|
+
name="title"
|
|
945
|
+
/>
|
|
946
|
+
<Meta
|
|
947
|
+
content="Venia Search"
|
|
948
|
+
name="description"
|
|
949
|
+
/>
|
|
777
950
|
</article>
|
|
778
951
|
`;
|
|
779
952
|
|
|
@@ -807,6 +980,16 @@ exports[`Search Page Component total count renders results from data 1`] = `
|
|
|
807
980
|
className="headerButtons"
|
|
808
981
|
>
|
|
809
982
|
<ProductSort
|
|
983
|
+
availableSortMethods={
|
|
984
|
+
Array [
|
|
985
|
+
Object {
|
|
986
|
+
"attribute": "position",
|
|
987
|
+
"id": "sortItem.positionAsc",
|
|
988
|
+
"sortDirection": "ASC",
|
|
989
|
+
"text": "Position Asc",
|
|
990
|
+
},
|
|
991
|
+
]
|
|
992
|
+
}
|
|
810
993
|
sortProps={
|
|
811
994
|
Array [
|
|
812
995
|
Object {
|
|
@@ -854,5 +1037,16 @@ exports[`Search Page Component total count renders results from data 1`] = `
|
|
|
854
1037
|
/>
|
|
855
1038
|
</section>
|
|
856
1039
|
</div>
|
|
1040
|
+
<Title>
|
|
1041
|
+
Venia Search
|
|
1042
|
+
</Title>
|
|
1043
|
+
<Meta
|
|
1044
|
+
content="Venia Search"
|
|
1045
|
+
name="title"
|
|
1046
|
+
/>
|
|
1047
|
+
<Meta
|
|
1048
|
+
content="Venia Search"
|
|
1049
|
+
name="description"
|
|
1050
|
+
/>
|
|
857
1051
|
</article>
|
|
858
1052
|
`;
|
|
@@ -37,7 +37,20 @@ jest.mock('../../FilterSidebar', () => ({
|
|
|
37
37
|
FilterSidebarShimmer: 'FilterSidebarShimmer'
|
|
38
38
|
}));
|
|
39
39
|
|
|
40
|
+
jest.mock('../../../components/Head', () => ({
|
|
41
|
+
Title: 'Title',
|
|
42
|
+
Meta: 'Meta'
|
|
43
|
+
}));
|
|
44
|
+
|
|
40
45
|
const talonProps = {
|
|
46
|
+
availableSortMethods: [
|
|
47
|
+
{
|
|
48
|
+
id: 'sortItem.positionAsc',
|
|
49
|
+
text: 'Position Asc',
|
|
50
|
+
attribute: 'position',
|
|
51
|
+
sortDirection: 'ASC'
|
|
52
|
+
}
|
|
53
|
+
],
|
|
41
54
|
data: {
|
|
42
55
|
products: {
|
|
43
56
|
items: [{}]
|
|
@@ -17,6 +17,7 @@ import FilterModalOpenButton, {
|
|
|
17
17
|
} from '../FilterModalOpenButton';
|
|
18
18
|
import { FilterSidebarShimmer } from '../FilterSidebar';
|
|
19
19
|
import Shimmer from '../Shimmer';
|
|
20
|
+
import { Meta, Title } from '../Head';
|
|
20
21
|
|
|
21
22
|
const FilterModal = React.lazy(() => import('../FilterModal'));
|
|
22
23
|
const FilterSidebar = React.lazy(() => import('../FilterSidebar'));
|
|
@@ -25,6 +26,7 @@ const SearchPage = props => {
|
|
|
25
26
|
const classes = useStyle(defaultClasses, props.classes);
|
|
26
27
|
const talonProps = useSearchPage();
|
|
27
28
|
const {
|
|
29
|
+
availableSortMethods,
|
|
28
30
|
data,
|
|
29
31
|
error,
|
|
30
32
|
filters,
|
|
@@ -70,7 +72,7 @@ const SearchPage = props => {
|
|
|
70
72
|
|
|
71
73
|
if (data.products.items.length === 0) {
|
|
72
74
|
return (
|
|
73
|
-
<div className={classes.noResult}>
|
|
75
|
+
<div className={classes.noResult} data-cy="SearchPage-noResult">
|
|
74
76
|
<FormattedMessage
|
|
75
77
|
id={'searchPage.noResultImportant'}
|
|
76
78
|
defaultMessage={'No results found!'}
|
|
@@ -108,7 +110,7 @@ const SearchPage = props => {
|
|
|
108
110
|
const shouldShowFilterShimmer = filters === null;
|
|
109
111
|
|
|
110
112
|
// If there are no products we can hide the sort button.
|
|
111
|
-
const shouldShowSortButtons = productsCount;
|
|
113
|
+
const shouldShowSortButtons = productsCount && availableSortMethods;
|
|
112
114
|
const shouldShowSortShimmer = !productsCount && loading;
|
|
113
115
|
|
|
114
116
|
const maybeFilterButtons = shouldShowFilterButtons ? (
|
|
@@ -128,7 +130,12 @@ const SearchPage = props => {
|
|
|
128
130
|
) : null;
|
|
129
131
|
|
|
130
132
|
const maybeSortButton = shouldShowSortButtons ? (
|
|
131
|
-
|
|
133
|
+
availableSortMethods && (
|
|
134
|
+
<ProductSort
|
|
135
|
+
sortProps={sortProps}
|
|
136
|
+
availableSortMethods={availableSortMethods}
|
|
137
|
+
/>
|
|
138
|
+
)
|
|
132
139
|
) : shouldShowSortShimmer ? (
|
|
133
140
|
<ProductSortShimmer />
|
|
134
141
|
) : null;
|
|
@@ -151,7 +158,7 @@ const SearchPage = props => {
|
|
|
151
158
|
category: searchCategory,
|
|
152
159
|
term: searchTerm
|
|
153
160
|
}}
|
|
154
|
-
defaultMessage=
|
|
161
|
+
defaultMessage="Showing results for <highlight>{term}</highlight>{category, select, null {} other { in <highlight>{category}</highlight>}}:"
|
|
155
162
|
/>
|
|
156
163
|
) : (
|
|
157
164
|
<FormattedMessage
|
|
@@ -166,7 +173,7 @@ const SearchPage = props => {
|
|
|
166
173
|
{formatMessage(
|
|
167
174
|
{
|
|
168
175
|
id: 'searchPage.totalPages',
|
|
169
|
-
defaultMessage:
|
|
176
|
+
defaultMessage: '{totalCount} items'
|
|
170
177
|
},
|
|
171
178
|
{ totalCount: productsCount }
|
|
172
179
|
)}
|
|
@@ -175,8 +182,12 @@ const SearchPage = props => {
|
|
|
175
182
|
<Shimmer width={5} />
|
|
176
183
|
) : null;
|
|
177
184
|
|
|
185
|
+
const metaLabel = [searchTerm, `${STORE_NAME} Search`]
|
|
186
|
+
.filter(Boolean)
|
|
187
|
+
.join(' - ');
|
|
188
|
+
|
|
178
189
|
return (
|
|
179
|
-
<article className={classes.root}>
|
|
190
|
+
<article className={classes.root} data-cy="SearchPage-root">
|
|
180
191
|
<div className={classes.sidebar}>
|
|
181
192
|
<Suspense fallback={<FilterSidebarShimmer />}>
|
|
182
193
|
{maybeSidebar}
|
|
@@ -197,6 +208,9 @@ const SearchPage = props => {
|
|
|
197
208
|
{content}
|
|
198
209
|
<Suspense fallback={null}>{maybeFilterModal}</Suspense>
|
|
199
210
|
</div>
|
|
211
|
+
<Title>{metaLabel}</Title>
|
|
212
|
+
<Meta name="title" content={metaLabel} />
|
|
213
|
+
<Meta name="description" content={metaLabel} />
|
|
200
214
|
</article>
|
|
201
215
|
);
|
|
202
216
|
};
|
|
@@ -4,6 +4,17 @@ import { node, number, oneOf, oneOfType, shape, string } from 'prop-types';
|
|
|
4
4
|
import { useStyle } from '../../classify';
|
|
5
5
|
import defaultClasses from './shimmer.module.css';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* @kind functional component
|
|
9
|
+
*
|
|
10
|
+
* @param {Object} classes Styles to apply to the `root` of the Shimmer. Available classes are `root` and `root_[TYPE]`.
|
|
11
|
+
* @param {string|number} borderRadius Border radius for the shimmer.
|
|
12
|
+
* @param {string|number} height Sets the height of the Shimmer. Numbers are in `rem` units. Strings are used directly (Example: '100px').
|
|
13
|
+
* @param {string|number} width Sets the width of the Shimmer. Numbers are in `rem` units. Strings are used directly (Example: '100px').
|
|
14
|
+
* @param {Object} style CSS styles to apply to the Shimmer.
|
|
15
|
+
* @param {'rectangle'|'button'|'checkbox'|'radio'|'textArea'|'textInput'} type The base element shape to apply to the Shimmer.
|
|
16
|
+
* @param {node} children Children to output within the Shimmer. Useful for setting image placeholders.
|
|
17
|
+
*/
|
|
7
18
|
const Shimmer = props => {
|
|
8
19
|
const {
|
|
9
20
|
classes: propClasses,
|
|
@@ -44,8 +55,6 @@ const Shimmer = props => {
|
|
|
44
55
|
};
|
|
45
56
|
|
|
46
57
|
/**
|
|
47
|
-
* @typedef props
|
|
48
|
-
*
|
|
49
58
|
* @property {Object} classes is an object containing the class names for the
|
|
50
59
|
* Shimmer component.
|
|
51
60
|
* @property {string} classes.root is the class for the container
|
|
@@ -42,28 +42,24 @@
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
.root_checkbox {
|
|
45
|
-
composes:
|
|
45
|
+
composes: input_shimmer from '../Checkbox/checkbox.module.css';
|
|
46
46
|
composes: root;
|
|
47
|
-
border: none;
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
.root_radio {
|
|
51
|
-
composes:
|
|
50
|
+
composes: input_shimmer from '../RadioGroup/radio.module.css';
|
|
52
51
|
composes: root;
|
|
53
52
|
border: none;
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
.root_textArea {
|
|
57
|
-
composes:
|
|
56
|
+
composes: input_shimmer from '../TextArea/textArea.module.css';
|
|
58
57
|
composes: root;
|
|
59
|
-
min-height: 6.75rem;
|
|
60
|
-
border: none;
|
|
61
58
|
}
|
|
62
59
|
|
|
63
60
|
.root_textInput {
|
|
64
|
-
composes:
|
|
61
|
+
composes: input_shimmer from '../TextInput/textInput.module.css';
|
|
65
62
|
composes: root;
|
|
66
|
-
border: none;
|
|
67
63
|
}
|
|
68
64
|
|
|
69
65
|
@-webkit-keyframes shimmerAnimation {
|
|
@@ -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
|
}
|