@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
|
@@ -57,7 +57,10 @@ const ItemsReview = props => {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
return (
|
|
60
|
-
<div
|
|
60
|
+
<div
|
|
61
|
+
className={classes.items_review_container}
|
|
62
|
+
data-cy="ItemsReview-container"
|
|
63
|
+
>
|
|
61
64
|
<div className={classes.items_container}>
|
|
62
65
|
<div className={classes.total_quantity}>
|
|
63
66
|
<span className={classes.total_quantity_amount}>
|
|
@@ -12,7 +12,7 @@ exports[`OrderConfirmationPage renders OrderConfirmationPage component 1`] = `
|
|
|
12
12
|
</h2>
|
|
13
13
|
<div>
|
|
14
14
|
<mock-FormattedMessage
|
|
15
|
-
defaultMessage="Order Number"
|
|
15
|
+
defaultMessage="Order Number: {orderNumber}"
|
|
16
16
|
id="checkoutPage.orderNumber"
|
|
17
17
|
values={
|
|
18
18
|
Object {
|
|
@@ -92,6 +92,7 @@ const CreateAccount = props => {
|
|
|
92
92
|
<TextInput
|
|
93
93
|
field="customer.firstname"
|
|
94
94
|
autoComplete="given-name"
|
|
95
|
+
data-cy="OrderConfirmationPage-CreateAccount-firstName"
|
|
95
96
|
validate={isRequired}
|
|
96
97
|
validateOnBlur
|
|
97
98
|
/>
|
|
@@ -105,6 +106,7 @@ const CreateAccount = props => {
|
|
|
105
106
|
<TextInput
|
|
106
107
|
field="customer.lastname"
|
|
107
108
|
autoComplete="family-name"
|
|
109
|
+
data-cy="OrderConfirmationPage-CreateAccount-lastName"
|
|
108
110
|
validate={isRequired}
|
|
109
111
|
validateOnBlur
|
|
110
112
|
/>
|
|
@@ -118,6 +120,7 @@ const CreateAccount = props => {
|
|
|
118
120
|
<TextInput
|
|
119
121
|
field="customer.email"
|
|
120
122
|
autoComplete="email"
|
|
123
|
+
data-cy="OrderConfirmationPage-CreateAccount-email"
|
|
121
124
|
validate={isRequired}
|
|
122
125
|
validateOnBlur
|
|
123
126
|
/>
|
|
@@ -130,6 +133,7 @@ const CreateAccount = props => {
|
|
|
130
133
|
fieldName="password"
|
|
131
134
|
isToggleButtonHidden={false}
|
|
132
135
|
autoComplete="new-password"
|
|
136
|
+
data-cy="OrderConfirmationPage-CreateAccount-password"
|
|
133
137
|
validate={combine([
|
|
134
138
|
isRequired,
|
|
135
139
|
[hasLengthAtLeast, 8],
|
|
@@ -141,6 +145,7 @@ const CreateAccount = props => {
|
|
|
141
145
|
<Checkbox
|
|
142
146
|
field="subscribe"
|
|
143
147
|
id="subscribe"
|
|
148
|
+
data-cy="OrderConfirmationPage-CreateAccount-subscribe"
|
|
144
149
|
label={formatMessage({
|
|
145
150
|
id: 'checkoutPage.subscribe',
|
|
146
151
|
defaultMessage: 'Subscribe to news and updates'
|
|
@@ -152,6 +157,7 @@ const CreateAccount = props => {
|
|
|
152
157
|
disabled={isDisabled}
|
|
153
158
|
type="submit"
|
|
154
159
|
className={classes.create_account_button}
|
|
160
|
+
data-cy="OrderConfirmationPage-CreateAccount-createAccountButton"
|
|
155
161
|
>
|
|
156
162
|
<FormattedMessage
|
|
157
163
|
id={'checkoutPage.createAccount'}
|
|
@@ -64,7 +64,7 @@ const OrderConfirmationPage = props => {
|
|
|
64
64
|
const additionalAddressString = `${city}, ${region} ${postcode} ${country}`;
|
|
65
65
|
|
|
66
66
|
return (
|
|
67
|
-
<div className={classes.root}>
|
|
67
|
+
<div className={classes.root} data-cy="OrderConfirmationPage-root">
|
|
68
68
|
<StoreTitle>
|
|
69
69
|
{formatMessage({
|
|
70
70
|
id: 'checkoutPage.titleReceipt',
|
|
@@ -72,16 +72,22 @@ const OrderConfirmationPage = props => {
|
|
|
72
72
|
})}
|
|
73
73
|
</StoreTitle>
|
|
74
74
|
<div className={classes.mainContainer}>
|
|
75
|
-
<h2
|
|
75
|
+
<h2
|
|
76
|
+
data-cy="OrderConfirmationPage-header"
|
|
77
|
+
className={classes.heading}
|
|
78
|
+
>
|
|
76
79
|
<FormattedMessage
|
|
77
80
|
id={'checkoutPage.thankYou'}
|
|
78
81
|
defaultMessage={'Thank you for your order!'}
|
|
79
82
|
/>
|
|
80
83
|
</h2>
|
|
81
|
-
<div
|
|
84
|
+
<div
|
|
85
|
+
data-cy="OrderConfirmationPage-orderNumber"
|
|
86
|
+
className={classes.orderNumber}
|
|
87
|
+
>
|
|
82
88
|
<FormattedMessage
|
|
83
89
|
id={'checkoutPage.orderNumber'}
|
|
84
|
-
defaultMessage={'Order Number'}
|
|
90
|
+
defaultMessage={'Order Number: {orderNumber}'}
|
|
85
91
|
values={{ orderNumber }}
|
|
86
92
|
/>
|
|
87
93
|
</div>
|
|
@@ -8,7 +8,7 @@ import defaultClasses from './orderSummary.module.css';
|
|
|
8
8
|
const OrderSummary = props => {
|
|
9
9
|
const classes = useStyle(defaultClasses, props.classes);
|
|
10
10
|
return (
|
|
11
|
-
<div className={classes.root}>
|
|
11
|
+
<div data-cy="OrderSummary-root" className={classes.root}>
|
|
12
12
|
<h1 className={classes.title}>
|
|
13
13
|
<FormattedMessage
|
|
14
14
|
id={'checkoutPage.orderSummary'}
|
|
@@ -39,7 +39,7 @@ const BraintreeSummary = props => {
|
|
|
39
39
|
formatMessage(
|
|
40
40
|
{
|
|
41
41
|
id: 'checkoutPage.paymentSummary',
|
|
42
|
-
defaultMessage: '
|
|
42
|
+
defaultMessage: '{cardType} ending in {lastFour}'
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
cardType: paymentNonce.details.cardType,
|
|
@@ -94,6 +94,7 @@ const BraintreeSummary = props => {
|
|
|
94
94
|
className={classes.edit_button}
|
|
95
95
|
onClick={onEdit}
|
|
96
96
|
type="button"
|
|
97
|
+
data-cy="BrainTreeSummary-editButton"
|
|
97
98
|
>
|
|
98
99
|
<Icon
|
|
99
100
|
size={16}
|
|
@@ -151,7 +151,7 @@ const CreditCard = props => {
|
|
|
151
151
|
) : null;
|
|
152
152
|
|
|
153
153
|
return (
|
|
154
|
-
<div className={classes.root}>
|
|
154
|
+
<div className={classes.root} data-cy="CreditCard-root">
|
|
155
155
|
<div className={creditCardComponentClassName}>
|
|
156
156
|
<FormError
|
|
157
157
|
classes={{ root: classes.formErrorContainer }}
|
|
@@ -169,6 +169,7 @@ const CreditCard = props => {
|
|
|
169
169
|
</div>
|
|
170
170
|
<div className={classes.address_check}>
|
|
171
171
|
<Checkbox
|
|
172
|
+
data-cy="PaymentInformation-billingAddressSame"
|
|
172
173
|
field="isBillingAddressSame"
|
|
173
174
|
label={formatMessage({
|
|
174
175
|
id: 'checkoutPage.billingAddressSame',
|
|
@@ -188,6 +189,7 @@ const CreditCard = props => {
|
|
|
188
189
|
})}
|
|
189
190
|
>
|
|
190
191
|
<TextInput
|
|
192
|
+
data-cy="CreditCard-billingAddress-firstname"
|
|
191
193
|
id="firstName"
|
|
192
194
|
field="firstName"
|
|
193
195
|
validate={isFieldRequired}
|
|
@@ -203,6 +205,7 @@ const CreditCard = props => {
|
|
|
203
205
|
})}
|
|
204
206
|
>
|
|
205
207
|
<TextInput
|
|
208
|
+
data-cy="CreditCard-billingAddress-lastname"
|
|
206
209
|
id="lastName"
|
|
207
210
|
field="lastName"
|
|
208
211
|
validate={isFieldRequired}
|
|
@@ -210,6 +213,7 @@ const CreditCard = props => {
|
|
|
210
213
|
/>
|
|
211
214
|
</Field>
|
|
212
215
|
<Country
|
|
216
|
+
data-cy="CreditCard-billingAddress-country"
|
|
213
217
|
classes={fieldClasses.country}
|
|
214
218
|
validate={isFieldRequired}
|
|
215
219
|
initialValue={
|
|
@@ -229,6 +233,7 @@ const CreditCard = props => {
|
|
|
229
233
|
})}
|
|
230
234
|
>
|
|
231
235
|
<TextInput
|
|
236
|
+
data-cy="CreditCard-billingAddress-street1"
|
|
232
237
|
id="street1"
|
|
233
238
|
field="street1"
|
|
234
239
|
validate={isFieldRequired}
|
|
@@ -245,6 +250,7 @@ const CreditCard = props => {
|
|
|
245
250
|
optional={true}
|
|
246
251
|
>
|
|
247
252
|
<TextInput
|
|
253
|
+
data-cy="CreditCard-billingAddress-street2"
|
|
248
254
|
id="street2"
|
|
249
255
|
field="street2"
|
|
250
256
|
initialValue={initialValues.street2}
|
|
@@ -259,6 +265,7 @@ const CreditCard = props => {
|
|
|
259
265
|
})}
|
|
260
266
|
>
|
|
261
267
|
<TextInput
|
|
268
|
+
data-cy="CreditCard-billingAddress-city"
|
|
262
269
|
id="city"
|
|
263
270
|
field="city"
|
|
264
271
|
validate={isFieldRequired}
|
|
@@ -266,6 +273,7 @@ const CreditCard = props => {
|
|
|
266
273
|
/>
|
|
267
274
|
</Field>
|
|
268
275
|
<Region
|
|
276
|
+
data-cy="CreditCard-billingAddress-region"
|
|
269
277
|
classes={fieldClasses.region}
|
|
270
278
|
initialValue={initialValues.region}
|
|
271
279
|
validate={isFieldRequired}
|
|
@@ -274,6 +282,7 @@ const CreditCard = props => {
|
|
|
274
282
|
optionValueKey={'id'}
|
|
275
283
|
/>
|
|
276
284
|
<Postcode
|
|
285
|
+
data-cy="CreditCard-billingAddress-postcode"
|
|
277
286
|
classes={fieldClasses.postal_code}
|
|
278
287
|
validate={isFieldRequired}
|
|
279
288
|
initialValue={initialValues.postcode}
|
|
@@ -287,6 +296,7 @@ const CreditCard = props => {
|
|
|
287
296
|
})}
|
|
288
297
|
>
|
|
289
298
|
<TextInput
|
|
299
|
+
data-cy="CreditCard-billingAddress-phoneNumber"
|
|
290
300
|
id="phoneNumber"
|
|
291
301
|
field="phoneNumber"
|
|
292
302
|
validate={isFieldRequired}
|
|
@@ -45,7 +45,7 @@ const EditModal = props => {
|
|
|
45
45
|
<FormattedMessage
|
|
46
46
|
id={'checkoutPage.paymentMethodStatus'}
|
|
47
47
|
defaultMessage={
|
|
48
|
-
'
|
|
48
|
+
'{selectedPaymentMethod} is not supported for editing.'
|
|
49
49
|
}
|
|
50
50
|
values={{ selectedPaymentMethod }}
|
|
51
51
|
/>
|
|
@@ -75,7 +75,7 @@ const PaymentInformation = props => {
|
|
|
75
75
|
) : null;
|
|
76
76
|
|
|
77
77
|
return (
|
|
78
|
-
<div className={classes.root}>
|
|
78
|
+
<div className={classes.root} data-cy="PaymentInformation-root">
|
|
79
79
|
<div className={classes.payment_info_container}>
|
|
80
80
|
<Suspense fallback={null}>{paymentInformation}</Suspense>
|
|
81
81
|
</div>
|
|
@@ -36,11 +36,13 @@ Array [
|
|
|
36
36
|
className="input"
|
|
37
37
|
>
|
|
38
38
|
<input
|
|
39
|
+
autoComplete="off"
|
|
39
40
|
className="input"
|
|
40
41
|
id="email"
|
|
41
42
|
name="email"
|
|
42
43
|
onBlur={[Function]}
|
|
43
44
|
onChange={[Function]}
|
|
45
|
+
onPaste={[Function]}
|
|
44
46
|
value=""
|
|
45
47
|
/>
|
|
46
48
|
</span>
|
|
@@ -475,11 +477,13 @@ Array [
|
|
|
475
477
|
className="input"
|
|
476
478
|
>
|
|
477
479
|
<input
|
|
480
|
+
autoComplete="off"
|
|
478
481
|
className="input"
|
|
479
482
|
id="email"
|
|
480
483
|
name="email"
|
|
481
484
|
onBlur={[Function]}
|
|
482
485
|
onChange={[Function]}
|
|
486
|
+
onPaste={[Function]}
|
|
483
487
|
value=""
|
|
484
488
|
/>
|
|
485
489
|
</span>
|
|
@@ -910,11 +914,13 @@ Array [
|
|
|
910
914
|
className="input"
|
|
911
915
|
>
|
|
912
916
|
<input
|
|
917
|
+
autoComplete="off"
|
|
913
918
|
className="input"
|
|
914
919
|
id="email"
|
|
915
920
|
name="email"
|
|
916
921
|
onBlur={[Function]}
|
|
917
922
|
onChange={[Function]}
|
|
923
|
+
onPaste={[Function]}
|
|
918
924
|
value="fry@planet.express"
|
|
919
925
|
/>
|
|
920
926
|
</span>
|
|
@@ -1363,11 +1369,13 @@ Array [
|
|
|
1363
1369
|
className="input"
|
|
1364
1370
|
>
|
|
1365
1371
|
<input
|
|
1372
|
+
autoComplete="off"
|
|
1366
1373
|
className="input"
|
|
1367
1374
|
id="email"
|
|
1368
1375
|
name="email"
|
|
1369
1376
|
onBlur={[Function]}
|
|
1370
1377
|
onChange={[Function]}
|
|
1378
|
+
onPaste={[Function]}
|
|
1371
1379
|
value="fry@planet.express"
|
|
1372
1380
|
/>
|
|
1373
1381
|
</span>
|
package/lib/components/CheckoutPage/ShippingInformation/AddressForm/__tests__/guestForm.spec.js
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { createTestInstance } from '@magento/peregrine';
|
|
2
|
+
import { createTestInstance, useToasts } from '@magento/peregrine';
|
|
3
3
|
import { useGuestForm } from '@magento/peregrine/lib/talons/CheckoutPage/ShippingInformation/AddressForm/useGuestForm';
|
|
4
4
|
|
|
5
5
|
import GuestForm from '../guestForm';
|
|
6
6
|
|
|
7
|
+
jest.mock('@magento/peregrine', () => {
|
|
8
|
+
const state = {};
|
|
9
|
+
const api = {
|
|
10
|
+
addToast: jest.fn()
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const useToasts = jest.fn(() => [state, api]);
|
|
14
|
+
return {
|
|
15
|
+
...jest.requireActual('@magento/peregrine'),
|
|
16
|
+
useToasts
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
|
|
7
20
|
jest.mock(
|
|
8
21
|
'@magento/peregrine/lib/talons/CheckoutPage/ShippingInformation/AddressForm/useGuestForm'
|
|
9
22
|
);
|
|
@@ -48,6 +61,48 @@ test('renders form error', () => {
|
|
|
48
61
|
expect(tree.toJSON()).toMatchSnapshot();
|
|
49
62
|
});
|
|
50
63
|
|
|
64
|
+
test('renders signIn suggestion toast message', () => {
|
|
65
|
+
const addToast = jest.fn();
|
|
66
|
+
useToasts.mockReturnValueOnce([{}, { addToast }]);
|
|
67
|
+
useGuestForm.mockReturnValueOnce({
|
|
68
|
+
...emptyFormProps,
|
|
69
|
+
showSignInToast: true
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
createTestInstance(<GuestForm {...mockProps} />);
|
|
73
|
+
|
|
74
|
+
expect(addToast).toHaveBeenCalled();
|
|
75
|
+
expect(addToast.mock.calls[0][0]).toMatchInlineSnapshot(`
|
|
76
|
+
Object {
|
|
77
|
+
"actionText": "Yes, sign in",
|
|
78
|
+
"dismissActionText": "No, thanks",
|
|
79
|
+
"dismissable": true,
|
|
80
|
+
"hasDismissAction": true,
|
|
81
|
+
"icon": <Icon
|
|
82
|
+
attrs={
|
|
83
|
+
Object {
|
|
84
|
+
"width": 20,
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
src={
|
|
88
|
+
Object {
|
|
89
|
+
"$$typeof": Symbol(react.forward_ref),
|
|
90
|
+
"propTypes": Object {
|
|
91
|
+
"color": [Function],
|
|
92
|
+
"size": [Function],
|
|
93
|
+
},
|
|
94
|
+
"render": [Function],
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/>,
|
|
98
|
+
"message": "The email you provided is associated with an existing Venia account. Would you like to sign into this account?",
|
|
99
|
+
"onAction": [Function],
|
|
100
|
+
"timeout": false,
|
|
101
|
+
"type": "info",
|
|
102
|
+
}
|
|
103
|
+
`);
|
|
104
|
+
});
|
|
105
|
+
|
|
51
106
|
describe('renders prefilled form with data', () => {
|
|
52
107
|
const initialValues = {
|
|
53
108
|
city: 'Manhattan',
|
|
@@ -122,6 +122,7 @@ const CustomerForm = props => {
|
|
|
122
122
|
<Checkbox
|
|
123
123
|
disabled={!!initialValues.default_shipping}
|
|
124
124
|
id="default_shipping"
|
|
125
|
+
data-cy="CustomerForm-defaultShipping"
|
|
125
126
|
field="default_shipping"
|
|
126
127
|
label={formatMessage({
|
|
127
128
|
id: 'customerForm.defaultShipping',
|
|
@@ -138,6 +139,7 @@ const CustomerForm = props => {
|
|
|
138
139
|
<FormError errors={Array.from(errors.values())} />
|
|
139
140
|
<Form
|
|
140
141
|
className={classes.root}
|
|
142
|
+
data-cy="CustomerForm-root"
|
|
141
143
|
initialValues={initialValues}
|
|
142
144
|
onSubmit={handleSubmit}
|
|
143
145
|
>
|
|
@@ -155,6 +157,7 @@ const CustomerForm = props => {
|
|
|
155
157
|
disabled={!hasDefaultShipping}
|
|
156
158
|
field="firstname"
|
|
157
159
|
id="customer_firstname"
|
|
160
|
+
data-cy="CustomerForm-firstName"
|
|
158
161
|
validate={isRequired}
|
|
159
162
|
/>
|
|
160
163
|
</Field>
|
|
@@ -171,12 +174,16 @@ const CustomerForm = props => {
|
|
|
171
174
|
disabled={!hasDefaultShipping}
|
|
172
175
|
field="lastname"
|
|
173
176
|
id="customer_lastname"
|
|
177
|
+
data-cy="CustomerForm-lastName"
|
|
174
178
|
validate={isRequired}
|
|
175
179
|
/>
|
|
176
180
|
</Field>
|
|
177
181
|
</div>
|
|
178
182
|
<div className={classes.country}>
|
|
179
|
-
<Country
|
|
183
|
+
<Country
|
|
184
|
+
validate={isRequired}
|
|
185
|
+
data-cy="CustomerForm-country"
|
|
186
|
+
/>
|
|
180
187
|
</div>
|
|
181
188
|
<div className={classes.street0}>
|
|
182
189
|
<Field
|
|
@@ -190,6 +197,7 @@ const CustomerForm = props => {
|
|
|
190
197
|
field="street[0]"
|
|
191
198
|
validate={isRequired}
|
|
192
199
|
id="customer_street0"
|
|
200
|
+
data-cy="CustomerForm-street0"
|
|
193
201
|
/>
|
|
194
202
|
</Field>
|
|
195
203
|
</div>
|
|
@@ -202,7 +210,11 @@ const CustomerForm = props => {
|
|
|
202
210
|
})}
|
|
203
211
|
optional={true}
|
|
204
212
|
>
|
|
205
|
-
<TextInput
|
|
213
|
+
<TextInput
|
|
214
|
+
field="street[1]"
|
|
215
|
+
id="customer_street1"
|
|
216
|
+
data-cy="CustomerForm-street1"
|
|
217
|
+
/>
|
|
206
218
|
</Field>
|
|
207
219
|
</div>
|
|
208
220
|
<div className={classes.city}>
|
|
@@ -217,19 +229,24 @@ const CustomerForm = props => {
|
|
|
217
229
|
field="city"
|
|
218
230
|
validate={isRequired}
|
|
219
231
|
id="customer_city"
|
|
232
|
+
data-cy="CustomerForm-city"
|
|
220
233
|
/>
|
|
221
234
|
</Field>
|
|
222
235
|
</div>
|
|
223
236
|
<div className={classes.region}>
|
|
224
237
|
<Region
|
|
225
238
|
validate={isRequired}
|
|
239
|
+
data-cy="CustomerForm-region"
|
|
226
240
|
fieldInput={'region[region]'}
|
|
227
241
|
fieldSelect={'region[region_id]'}
|
|
228
242
|
optionValueKey={'id'}
|
|
229
243
|
/>
|
|
230
244
|
</div>
|
|
231
245
|
<div className={classes.postcode}>
|
|
232
|
-
<Postcode
|
|
246
|
+
<Postcode
|
|
247
|
+
validate={isRequired}
|
|
248
|
+
data-cy="CustomerForm-postcode"
|
|
249
|
+
/>
|
|
233
250
|
</div>
|
|
234
251
|
<div className={classes.telephone}>
|
|
235
252
|
<Field
|
|
@@ -243,13 +260,19 @@ const CustomerForm = props => {
|
|
|
243
260
|
field="telephone"
|
|
244
261
|
validate={isRequired}
|
|
245
262
|
id="customer_telephone"
|
|
263
|
+
data-cy="CustomerForm-telephone"
|
|
246
264
|
/>
|
|
247
265
|
</Field>
|
|
248
266
|
</div>
|
|
249
267
|
{defaultShippingElement}
|
|
250
268
|
<div className={classes.buttons}>
|
|
251
269
|
{cancelButton}
|
|
252
|
-
<Button
|
|
270
|
+
<Button
|
|
271
|
+
{...submitButtonProps}
|
|
272
|
+
data-cy="CustomerForm-submitButton"
|
|
273
|
+
>
|
|
274
|
+
{submitButtonText}
|
|
275
|
+
</Button>
|
|
253
276
|
</div>
|
|
254
277
|
</Form>
|
|
255
278
|
</Fragment>
|