@magento/venia-ui 9.1.0-alpha.1 → 9.2.0-alpha.2
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 +27 -22
- package/lib/components/Gallery/item.js +16 -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
|
@@ -3,10 +3,9 @@ import { AccountInformationPageFragment } from './accountInformationPageFragment
|
|
|
3
3
|
|
|
4
4
|
export const SET_CUSTOMER_INFORMATION = gql`
|
|
5
5
|
mutation SetCustomerInformation($customerInput: CustomerInput!) {
|
|
6
|
-
updateCustomer(input: $customerInput)
|
|
7
|
-
|
|
6
|
+
updateCustomer(input: $customerInput) {
|
|
7
|
+
# eslint-disable-next-line @graphql-eslint/require-id-when-available
|
|
8
8
|
customer {
|
|
9
|
-
id
|
|
10
9
|
...AccountInformationPageFragment
|
|
11
10
|
}
|
|
12
11
|
}
|
|
@@ -21,9 +20,8 @@ export const CHANGE_CUSTOMER_PASSWORD = gql`
|
|
|
21
20
|
) {
|
|
22
21
|
changeCustomerPassword(
|
|
23
22
|
currentPassword: $currentPassword
|
|
24
|
-
newPassword: $newPassword
|
|
25
|
-
)
|
|
26
|
-
id
|
|
23
|
+
newPassword: $newPassword # eslint-disable-next-line @graphql-eslint/require-id-when-available
|
|
24
|
+
) {
|
|
27
25
|
email
|
|
28
26
|
}
|
|
29
27
|
}
|
|
@@ -31,8 +29,8 @@ export const CHANGE_CUSTOMER_PASSWORD = gql`
|
|
|
31
29
|
|
|
32
30
|
export const GET_CUSTOMER_INFORMATION = gql`
|
|
33
31
|
query GetCustomerInformation {
|
|
32
|
+
# eslint-disable-next-line @graphql-eslint/require-id-when-available
|
|
34
33
|
customer {
|
|
35
|
-
id
|
|
36
34
|
...AccountInformationPageFragment
|
|
37
35
|
}
|
|
38
36
|
}
|
|
@@ -91,6 +91,7 @@ const AccountInformationPage = props => {
|
|
|
91
91
|
disabled={false}
|
|
92
92
|
onClick={showUpdateMode}
|
|
93
93
|
priority="normal"
|
|
94
|
+
data-cy="AccountInformationPage-editInformationButton"
|
|
94
95
|
>
|
|
95
96
|
<FormattedMessage
|
|
96
97
|
id={'global.editButton'}
|
|
@@ -123,7 +124,10 @@ const AccountInformationPage = props => {
|
|
|
123
124
|
defaultMessage: 'Account Information'
|
|
124
125
|
})}
|
|
125
126
|
</StoreTitle>
|
|
126
|
-
<h1
|
|
127
|
+
<h1
|
|
128
|
+
className={classes.title}
|
|
129
|
+
data-cy="AccountInformationPage-title"
|
|
130
|
+
>
|
|
127
131
|
<FormattedMessage
|
|
128
132
|
id={'accountInformationPage.accountInformation'}
|
|
129
133
|
defaultMessage={'Account Information'}
|
|
@@ -42,16 +42,21 @@ const EditForm = props => {
|
|
|
42
42
|
[isNotEqualToField, 'password']
|
|
43
43
|
])}
|
|
44
44
|
isToggleButtonHidden={false}
|
|
45
|
+
data-cy="newPassword"
|
|
45
46
|
/>
|
|
46
47
|
</div>
|
|
47
48
|
) : null;
|
|
48
49
|
|
|
49
50
|
const maybeChangePasswordButton = !shouldShowNewPassword ? (
|
|
50
|
-
<div
|
|
51
|
+
<div
|
|
52
|
+
className={classes.changePasswordButtonContainer}
|
|
53
|
+
data-cy="editForm-changePasswordButtonContainer"
|
|
54
|
+
>
|
|
51
55
|
<LinkButton
|
|
52
56
|
classes={classes.changePasswordButton}
|
|
53
57
|
type="button"
|
|
54
58
|
onClick={handleChangePassword}
|
|
59
|
+
data-cy="linkButton-root"
|
|
55
60
|
>
|
|
56
61
|
<FormattedMessage
|
|
57
62
|
id={'global.changePassword'}
|
|
@@ -81,7 +86,11 @@ const EditForm = props => {
|
|
|
81
86
|
defaultMessage: 'First Name'
|
|
82
87
|
})}
|
|
83
88
|
>
|
|
84
|
-
<TextInput
|
|
89
|
+
<TextInput
|
|
90
|
+
field="firstname"
|
|
91
|
+
validate={isRequired}
|
|
92
|
+
data-cy="firstname"
|
|
93
|
+
/>
|
|
85
94
|
</Field>
|
|
86
95
|
</div>
|
|
87
96
|
<div className={classes.lastname}>
|
|
@@ -92,7 +101,11 @@ const EditForm = props => {
|
|
|
92
101
|
defaultMessage: 'Last Name'
|
|
93
102
|
})}
|
|
94
103
|
>
|
|
95
|
-
<TextInput
|
|
104
|
+
<TextInput
|
|
105
|
+
field="lastname"
|
|
106
|
+
validate={isRequired}
|
|
107
|
+
data-cy="lastname"
|
|
108
|
+
/>
|
|
96
109
|
</Field>
|
|
97
110
|
</div>
|
|
98
111
|
<div className={classes.email}>
|
|
@@ -103,7 +116,11 @@ const EditForm = props => {
|
|
|
103
116
|
defaultMessage: 'Email'
|
|
104
117
|
})}
|
|
105
118
|
>
|
|
106
|
-
<TextInput
|
|
119
|
+
<TextInput
|
|
120
|
+
field="email"
|
|
121
|
+
validate={isRequired}
|
|
122
|
+
data-cy="email"
|
|
123
|
+
/>
|
|
107
124
|
</Field>
|
|
108
125
|
</div>
|
|
109
126
|
<div className={classes.password}>
|
|
@@ -113,6 +130,7 @@ const EditForm = props => {
|
|
|
113
130
|
validate={isRequired}
|
|
114
131
|
autoComplete="current-password"
|
|
115
132
|
isToggleButtonHidden={false}
|
|
133
|
+
data-cy="password"
|
|
116
134
|
/>
|
|
117
135
|
</div>
|
|
118
136
|
{maybeNewPasswordField}
|
|
@@ -81,7 +81,7 @@ const AccountMenu = React.forwardRef((props, ref) => {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
return (
|
|
84
|
-
<aside className={rootClass}>
|
|
84
|
+
<aside className={rootClass} data-cy="AccountMenu-root">
|
|
85
85
|
<div ref={ref} className={contentsClass}>
|
|
86
86
|
{accountMenuIsOpen ? dropdownContents : null}
|
|
87
87
|
</div>
|
|
@@ -25,12 +25,13 @@ const AccountMenuItems = props => {
|
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
|
-
<div className={classes.root}>
|
|
28
|
+
<div className={classes.root} data-cy="accountMenuItems-root">
|
|
29
29
|
{menu}
|
|
30
30
|
<button
|
|
31
31
|
className={classes.signOut}
|
|
32
32
|
onClick={handleSignOut}
|
|
33
33
|
type="button"
|
|
34
|
+
data-cy="accountMenuItems-signOut"
|
|
34
35
|
>
|
|
35
36
|
<FormattedMessage
|
|
36
37
|
id={'accountMenu.signOutButtonText'}
|
|
@@ -44,6 +44,7 @@ exports[`renders a default address 1`] = `
|
|
|
44
44
|
className="telephone"
|
|
45
45
|
>
|
|
46
46
|
<mock-FormattedMessage
|
|
47
|
+
defaultMessage="Phone {telephone}"
|
|
47
48
|
id="addressBookPage.telephone"
|
|
48
49
|
values={
|
|
49
50
|
Object {
|
|
@@ -146,6 +147,7 @@ exports[`renders a non-default address 1`] = `
|
|
|
146
147
|
className="telephone"
|
|
147
148
|
>
|
|
148
149
|
<mock-FormattedMessage
|
|
150
|
+
defaultMessage="Phone {telephone}"
|
|
149
151
|
id="addressBookPage.telephone"
|
|
150
152
|
values={
|
|
151
153
|
Object {
|
|
@@ -321,6 +323,7 @@ exports[`renders an address with a middle name 1`] = `
|
|
|
321
323
|
className="telephone"
|
|
322
324
|
>
|
|
323
325
|
<mock-FormattedMessage
|
|
326
|
+
defaultMessage="Phone {telephone}"
|
|
324
327
|
id="addressBookPage.telephone"
|
|
325
328
|
values={
|
|
326
329
|
Object {
|
|
@@ -431,6 +434,7 @@ exports[`renders delete confirmation if isConfirmingDelete is true 1`] = `
|
|
|
431
434
|
className="telephone"
|
|
432
435
|
>
|
|
433
436
|
<mock-FormattedMessage
|
|
437
|
+
defaultMessage="Phone {telephone}"
|
|
434
438
|
id="addressBookPage.telephone"
|
|
435
439
|
values={
|
|
436
440
|
Object {
|
|
@@ -597,6 +601,7 @@ exports[`renders disabled delete confirmation if isConfirmingDelete and isDeleti
|
|
|
597
601
|
className="telephone"
|
|
598
602
|
>
|
|
599
603
|
<mock-FormattedMessage
|
|
604
|
+
defaultMessage="Phone {telephone}"
|
|
600
605
|
id="addressBookPage.telephone"
|
|
601
606
|
values={
|
|
602
607
|
Object {
|
|
@@ -92,10 +92,14 @@ const AddEditDialog = props => {
|
|
|
92
92
|
classes={{ root: classes.errorContainer }}
|
|
93
93
|
errors={Array.from(formErrors.values())}
|
|
94
94
|
/>
|
|
95
|
-
<div className={classes.root}>
|
|
95
|
+
<div className={classes.root} data-cy="AddEditDialog-root">
|
|
96
96
|
<div className={classes.firstname}>
|
|
97
97
|
<Field id="firstname" label={firstNameLabel}>
|
|
98
|
-
<TextInput
|
|
98
|
+
<TextInput
|
|
99
|
+
field="firstname"
|
|
100
|
+
validate={isRequired}
|
|
101
|
+
data-cy="firstname"
|
|
102
|
+
/>
|
|
99
103
|
</Field>
|
|
100
104
|
</div>
|
|
101
105
|
<div className={classes.middlename}>
|
|
@@ -104,30 +108,46 @@ const AddEditDialog = props => {
|
|
|
104
108
|
label={middleNameLabel}
|
|
105
109
|
optional={true}
|
|
106
110
|
>
|
|
107
|
-
<TextInput field="middlename" />
|
|
111
|
+
<TextInput field="middlename" data-cy="middlename" />
|
|
108
112
|
</Field>
|
|
109
113
|
</div>
|
|
110
114
|
<div className={classes.lastname}>
|
|
111
115
|
<Field id="lastname" label={lastNameLabel}>
|
|
112
|
-
<TextInput
|
|
116
|
+
<TextInput
|
|
117
|
+
field="lastname"
|
|
118
|
+
validate={isRequired}
|
|
119
|
+
data-cy="lastname"
|
|
120
|
+
/>
|
|
113
121
|
</Field>
|
|
114
122
|
</div>
|
|
115
123
|
<div className={classes.country}>
|
|
116
|
-
<Country
|
|
124
|
+
<Country
|
|
125
|
+
field={'country_code'}
|
|
126
|
+
validate={isRequired}
|
|
127
|
+
data-cy="country"
|
|
128
|
+
/>
|
|
117
129
|
</div>
|
|
118
130
|
<div className={classes.street1}>
|
|
119
131
|
<Field id="street1" label={street1Label}>
|
|
120
|
-
<TextInput
|
|
132
|
+
<TextInput
|
|
133
|
+
field="street[0]"
|
|
134
|
+
validate={isRequired}
|
|
135
|
+
data-cy="street[0]"
|
|
136
|
+
/>
|
|
121
137
|
</Field>
|
|
122
138
|
</div>
|
|
123
139
|
<div className={classes.street2}>
|
|
124
140
|
<Field id="street2" label={street2Label} optional={true}>
|
|
125
|
-
<TextInput field="street[1]" />
|
|
141
|
+
<TextInput field="street[1]" data-cy="street[1]" />
|
|
126
142
|
</Field>
|
|
127
143
|
</div>
|
|
128
144
|
<div className={classes.city}>
|
|
129
145
|
<Field id="city" label={cityLabel}>
|
|
130
|
-
<TextInput
|
|
146
|
+
<TextInput
|
|
147
|
+
field="city"
|
|
148
|
+
validate={isRequired}
|
|
149
|
+
data-cy="city"
|
|
150
|
+
/>
|
|
131
151
|
</Field>
|
|
132
152
|
</div>
|
|
133
153
|
<div className={classes.region}>
|
|
@@ -137,20 +157,26 @@ const AddEditDialog = props => {
|
|
|
137
157
|
fieldSelect={'region[region_id]'}
|
|
138
158
|
optionValueKey="id"
|
|
139
159
|
validate={isRequired}
|
|
160
|
+
data-cy="region"
|
|
140
161
|
/>
|
|
141
162
|
</div>
|
|
142
163
|
<div className={classes.postcode}>
|
|
143
|
-
<Postcode validate={isRequired} />
|
|
164
|
+
<Postcode validate={isRequired} data-cy="Postcode" />
|
|
144
165
|
</div>
|
|
145
166
|
<div className={classes.telephone}>
|
|
146
167
|
<Field id="telephone" label={telephoneLabel}>
|
|
147
|
-
<TextInput
|
|
168
|
+
<TextInput
|
|
169
|
+
field="telephone"
|
|
170
|
+
validate={isRequired}
|
|
171
|
+
data-cy="telephone"
|
|
172
|
+
/>
|
|
148
173
|
</Field>
|
|
149
174
|
</div>
|
|
150
175
|
<div className={classes.default_address_check}>
|
|
151
176
|
<Checkbox
|
|
152
177
|
field="default_shipping"
|
|
153
178
|
label={defaultAddressCheckLabel}
|
|
179
|
+
data-cy="default_shipping"
|
|
154
180
|
/>
|
|
155
181
|
</div>
|
|
156
182
|
</div>
|
|
@@ -93,13 +93,16 @@ const AddressBookPage = props => {
|
|
|
93
93
|
return (
|
|
94
94
|
<div className={classes.root}>
|
|
95
95
|
<StoreTitle>{PAGE_TITLE}</StoreTitle>
|
|
96
|
-
<h1 className={classes.heading}>
|
|
97
|
-
|
|
96
|
+
<h1 className={classes.heading} data-cy="AddressBookPage-heading">
|
|
97
|
+
{PAGE_TITLE}
|
|
98
|
+
</h1>
|
|
99
|
+
<div className={classes.content} data-cy="AddressBookPage-content">
|
|
98
100
|
{addressBookElements}
|
|
99
101
|
<LinkButton
|
|
100
102
|
className={classes.addButton}
|
|
101
103
|
key="addAddressButton"
|
|
102
104
|
onClick={handleAddAddress}
|
|
105
|
+
data-cy="AddressBookPage-addButton"
|
|
103
106
|
>
|
|
104
107
|
<Icon
|
|
105
108
|
classes={{
|
|
@@ -52,7 +52,10 @@ const AddressCard = props => {
|
|
|
52
52
|
});
|
|
53
53
|
|
|
54
54
|
const defaultBadge = default_shipping ? (
|
|
55
|
-
<span
|
|
55
|
+
<span
|
|
56
|
+
className={classes.defaultBadge}
|
|
57
|
+
data-cy="addressCard-defaultBadge"
|
|
58
|
+
>
|
|
56
59
|
<FormattedMessage
|
|
57
60
|
id={'addressCard.defaultText'}
|
|
58
61
|
defaultMessage={'Default'}
|
|
@@ -66,7 +69,11 @@ const AddressCard = props => {
|
|
|
66
69
|
const additionalAddressString = `${city}, ${region} ${postcode}`;
|
|
67
70
|
|
|
68
71
|
const deleteButtonElement = !default_shipping ? (
|
|
69
|
-
<LinkButton
|
|
72
|
+
<LinkButton
|
|
73
|
+
classes={{ root: classes.deleteButton }}
|
|
74
|
+
onClick={onDelete}
|
|
75
|
+
data-cy="addressCard-deleteButton"
|
|
76
|
+
>
|
|
70
77
|
<Icon classes={{ icon: null }} size={16} src={TrashIcon} />
|
|
71
78
|
<span className={classes.actionLabel}>
|
|
72
79
|
<FormattedMessage
|
|
@@ -86,6 +93,7 @@ const AddressCard = props => {
|
|
|
86
93
|
type="button"
|
|
87
94
|
negative={true}
|
|
88
95
|
onClick={onConfirmDelete}
|
|
96
|
+
data-cy="addressCard-confirmDeleteButton"
|
|
89
97
|
>
|
|
90
98
|
<FormattedMessage
|
|
91
99
|
id={'global.deleteButton'}
|
|
@@ -108,8 +116,11 @@ const AddressCard = props => {
|
|
|
108
116
|
) : null;
|
|
109
117
|
|
|
110
118
|
return (
|
|
111
|
-
<div className={classes.root}>
|
|
112
|
-
<div
|
|
119
|
+
<div className={classes.root} data-cy="addressCard-root">
|
|
120
|
+
<div
|
|
121
|
+
className={classes.contentContainer}
|
|
122
|
+
data-cy="addressCard-contentContainer"
|
|
123
|
+
>
|
|
113
124
|
{defaultBadge}
|
|
114
125
|
<span className={classes.name}>{nameString}</span>
|
|
115
126
|
{streetRows}
|
|
@@ -122,6 +133,7 @@ const AddressCard = props => {
|
|
|
122
133
|
<span className={classes.telephone}>
|
|
123
134
|
<FormattedMessage
|
|
124
135
|
id="addressBookPage.telephone"
|
|
136
|
+
defaultMessage="Phone {telephone}"
|
|
125
137
|
values={{ telephone }}
|
|
126
138
|
/>
|
|
127
139
|
</span>
|
|
@@ -130,6 +142,7 @@ const AddressCard = props => {
|
|
|
130
142
|
<LinkButton
|
|
131
143
|
classes={{ root: classes.editButton }}
|
|
132
144
|
onClick={onEdit}
|
|
145
|
+
data-cy="addressCard-editButton"
|
|
133
146
|
>
|
|
134
147
|
<Icon classes={{ icon: null }} size={16} src={EditIcon} />
|
|
135
148
|
<span className={classes.actionLabel}>
|
|
@@ -107,7 +107,11 @@ const App = props => {
|
|
|
107
107
|
<Main isMasked={hasOverlay}>
|
|
108
108
|
<Routes />
|
|
109
109
|
</Main>
|
|
110
|
-
<Mask
|
|
110
|
+
<Mask
|
|
111
|
+
isActive={hasOverlay}
|
|
112
|
+
dismiss={handleCloseDrawer}
|
|
113
|
+
data-cy="App-Mask-button"
|
|
114
|
+
/>
|
|
111
115
|
<Navigation />
|
|
112
116
|
<ToastContainer />
|
|
113
117
|
</HeadProvider>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Fragment, useMemo } from 'react';
|
|
2
2
|
import { FormattedMessage } from 'react-intl';
|
|
3
|
-
import {
|
|
3
|
+
import { string } from 'prop-types';
|
|
4
4
|
import { Link } from 'react-router-dom';
|
|
5
5
|
|
|
6
6
|
import { useBreadcrumbs } from '@magento/peregrine/lib/talons/Breadcrumbs/useBreadcrumbs';
|
|
@@ -13,7 +13,7 @@ const DELIMITER = '/';
|
|
|
13
13
|
/**
|
|
14
14
|
* Breadcrumbs! Generates a sorted display of category links.
|
|
15
15
|
*
|
|
16
|
-
* @param {String} props.categoryId the
|
|
16
|
+
* @param {String} props.categoryId the uid of the category for which to generate breadcrumbs
|
|
17
17
|
* @param {String} props.currentProduct the name of the product we're currently on, if any.
|
|
18
18
|
*/
|
|
19
19
|
const Breadcrumbs = props => {
|
|
@@ -103,6 +103,6 @@ const Breadcrumbs = props => {
|
|
|
103
103
|
export default Breadcrumbs;
|
|
104
104
|
|
|
105
105
|
Breadcrumbs.propTypes = {
|
|
106
|
-
categoryId:
|
|
106
|
+
categoryId: string.isRequired,
|
|
107
107
|
currentProduct: string
|
|
108
108
|
};
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
.root {
|
|
2
|
+
--whitespace-start: 1rem;
|
|
3
|
+
--whitespace-end: 10px;
|
|
4
|
+
|
|
2
5
|
composes: h-auto from global;
|
|
3
|
-
|
|
4
|
-
|
|
6
|
+
padding-left: var(--whitespace-start);
|
|
7
|
+
padding-top: var(--whitespace-start);
|
|
8
|
+
padding-bottom: var(--whitespace-end); /* Allow space for focus ring */
|
|
9
|
+
margin-bottom: calc(
|
|
10
|
+
-1 * var(--whitespace-end)
|
|
11
|
+
); /* Prevent focus ring space affecting the rest of the UI */
|
|
5
12
|
font-size: 0.875rem;
|
|
6
13
|
|
|
7
14
|
/* Permanent height to prevent pop-in. */
|
|
8
|
-
height: 0.875rem;
|
|
15
|
+
height: calc(0.875rem + var(--whitespace-start) + var(--whitespace-end));
|
|
9
16
|
|
|
10
17
|
/* Show ellipses when overflowing. */
|
|
11
18
|
overflow: hidden;
|
|
@@ -166,6 +166,7 @@ const GiftCards = props => {
|
|
|
166
166
|
<div className={containerClass}>
|
|
167
167
|
<TextInput
|
|
168
168
|
id={classes.card}
|
|
169
|
+
data-cy="GiftCards-card"
|
|
169
170
|
disabled={isApplyingCard || isCheckingBalance}
|
|
170
171
|
field="card"
|
|
171
172
|
mask={value => value && value.trim()}
|
|
@@ -187,6 +188,7 @@ const GiftCards = props => {
|
|
|
187
188
|
>
|
|
188
189
|
<Button
|
|
189
190
|
priority={'normal'}
|
|
191
|
+
data-cy="GiftCards-apply"
|
|
190
192
|
disabled={isApplyingCard}
|
|
191
193
|
onClick={applyGiftCard}
|
|
192
194
|
>
|
|
@@ -98,6 +98,7 @@ const CouponCode = props => {
|
|
|
98
98
|
<LinkButton
|
|
99
99
|
className={classes.removeButton}
|
|
100
100
|
disabled={removingCoupon}
|
|
101
|
+
data-cy="CouponCode-removeCouponButton"
|
|
101
102
|
onClick={() => {
|
|
102
103
|
handleRemoveCoupon(code);
|
|
103
104
|
}}
|
|
@@ -133,6 +134,7 @@ const CouponCode = props => {
|
|
|
133
134
|
<TextInput
|
|
134
135
|
field="couponCode"
|
|
135
136
|
id={'couponCode'}
|
|
137
|
+
data-cy="CouponCode-couponCode"
|
|
136
138
|
placeholder={formatMessage({
|
|
137
139
|
id: 'couponCode.enterCode',
|
|
138
140
|
defaultMessage: 'Enter code'
|
|
@@ -144,6 +146,7 @@ const CouponCode = props => {
|
|
|
144
146
|
</Field>
|
|
145
147
|
<Field>
|
|
146
148
|
<Button
|
|
149
|
+
data-cy="CouponCode-submit"
|
|
147
150
|
disabled={applyingCoupon}
|
|
148
151
|
priority={'normal'}
|
|
149
152
|
type={'submit'}
|
|
@@ -38,6 +38,7 @@ const GiftOptions = props => {
|
|
|
38
38
|
<div className={classes.option}>
|
|
39
39
|
<Checkbox
|
|
40
40
|
{...giftReceiptProps}
|
|
41
|
+
data-cy="GiftOptions-includeGiftReceipt"
|
|
41
42
|
label={formatMessage({
|
|
42
43
|
id: 'giftOptions.includeGiftReceipt',
|
|
43
44
|
defaultMessage: 'Include gift receipt'
|
|
@@ -47,6 +48,7 @@ const GiftOptions = props => {
|
|
|
47
48
|
<div className={classes.option}>
|
|
48
49
|
<Checkbox
|
|
49
50
|
{...printedCardProps}
|
|
51
|
+
data-cy="GiftOptions-includePrintedCard"
|
|
50
52
|
label={formatMessage({
|
|
51
53
|
id: 'giftOptions.includePrintedCard',
|
|
52
54
|
defaultMessage: 'Include printed card'
|
|
@@ -57,6 +59,7 @@ const GiftOptions = props => {
|
|
|
57
59
|
<Relevant when={shouldPromptForMessage}>
|
|
58
60
|
<TextArea
|
|
59
61
|
{...cardMessageProps}
|
|
62
|
+
data-cy="GiftOptions-cardMessage"
|
|
60
63
|
placeholder={formatMessage({
|
|
61
64
|
id: 'giftOptions.cardMessage',
|
|
62
65
|
defaultMessage: 'Enter your message here'
|
|
@@ -54,10 +54,17 @@ const ShippingForm = props => {
|
|
|
54
54
|
initialValues={selectedShippingFields}
|
|
55
55
|
onSubmit={handleOnSubmit}
|
|
56
56
|
>
|
|
57
|
-
<Country
|
|
58
|
-
|
|
57
|
+
<Country
|
|
58
|
+
data-cy="ShippingMethods-ShippingForm-country"
|
|
59
|
+
validate={isRequired}
|
|
60
|
+
/>
|
|
61
|
+
<Region
|
|
62
|
+
data-cy="ShippingMethods-ShippingForm-region"
|
|
63
|
+
validate={isRequired}
|
|
64
|
+
/>
|
|
59
65
|
<Postcode
|
|
60
66
|
fieldInput="zip"
|
|
67
|
+
data-cy="ShippingMethods-ShippingForm-postCode"
|
|
61
68
|
validate={isRequired}
|
|
62
69
|
onValueChange={handleZipChange}
|
|
63
70
|
/>
|
|
@@ -66,6 +73,7 @@ const ShippingForm = props => {
|
|
|
66
73
|
classes={{
|
|
67
74
|
root_normalPriority: classes.submit
|
|
68
75
|
}}
|
|
76
|
+
data-cy="ShippingMethods-ShippingForm-submit"
|
|
69
77
|
disabled={isSetShippingLoading}
|
|
70
78
|
priority="normal"
|
|
71
79
|
type="submit"
|
|
@@ -72,6 +72,7 @@ const ShippingMethods = props => {
|
|
|
72
72
|
classes={{
|
|
73
73
|
root_normalPriority: classes.estimateButton
|
|
74
74
|
}}
|
|
75
|
+
data-cy="ShippingMethods-estimateButton"
|
|
75
76
|
onClick={showForm}
|
|
76
77
|
>
|
|
77
78
|
<FormattedMessage
|
|
@@ -82,7 +83,7 @@ const ShippingMethods = props => {
|
|
|
82
83
|
);
|
|
83
84
|
|
|
84
85
|
return (
|
|
85
|
-
<div className={classes.root}>
|
|
86
|
+
<div className={classes.root} data-cy="ShippingMethods-root">
|
|
86
87
|
<p className={classes.message}>
|
|
87
88
|
<FormattedMessage
|
|
88
89
|
id={'shippingMethods.message'}
|
|
@@ -66,7 +66,7 @@ export const SET_SHIPPING_METHOD_MUTATION = gql`
|
|
|
66
66
|
) {
|
|
67
67
|
setShippingMethodsOnCart(
|
|
68
68
|
input: { cart_id: $cartId, shipping_methods: [$shippingMethod] }
|
|
69
|
-
)
|
|
69
|
+
) {
|
|
70
70
|
cart {
|
|
71
71
|
id
|
|
72
72
|
# If this mutation causes "free" to become available we need to know.
|
|
@@ -36,10 +36,11 @@ const PriceAdjustments = props => {
|
|
|
36
36
|
const { formatMessage } = useIntl();
|
|
37
37
|
|
|
38
38
|
return (
|
|
39
|
-
<div className={classes.root}>
|
|
39
|
+
<div className={classes.root} data-cy="PriceAdjustments-root">
|
|
40
40
|
<Accordion canOpenMultiple={true}>
|
|
41
41
|
<Section
|
|
42
42
|
id={'shipping_method'}
|
|
43
|
+
data-cy="PriceAdjustments-shippingMethodSection"
|
|
43
44
|
title={formatMessage({
|
|
44
45
|
id: 'priceAdjustments.shippingMethod',
|
|
45
46
|
defaultMessage: 'Estimate your Shipping'
|
|
@@ -53,6 +54,7 @@ const PriceAdjustments = props => {
|
|
|
53
54
|
</Section>
|
|
54
55
|
<Section
|
|
55
56
|
id={'coupon_code'}
|
|
57
|
+
data-cy="PriceAdjustments-couponCodeSection"
|
|
56
58
|
title={formatMessage({
|
|
57
59
|
id: 'priceAdjustments.couponCode',
|
|
58
60
|
defaultMessage: 'Enter Coupon Code'
|
|
@@ -65,6 +67,7 @@ const PriceAdjustments = props => {
|
|
|
65
67
|
<GiftCardSection setIsCartUpdating={setIsCartUpdating} />
|
|
66
68
|
<Section
|
|
67
69
|
id={'gift_options'}
|
|
70
|
+
data-cy="PriceAdjustments-giftOptionsSection"
|
|
68
71
|
title={formatMessage({
|
|
69
72
|
id: 'priceAdjustments.giftOptions',
|
|
70
73
|
defaultMessage: 'See Gift Options'
|
|
@@ -43,13 +43,19 @@ const DiscountSummary = props => {
|
|
|
43
43
|
|
|
44
44
|
return discount.value ? (
|
|
45
45
|
<Fragment>
|
|
46
|
-
<span
|
|
46
|
+
<span
|
|
47
|
+
className={classes.lineItemLabel}
|
|
48
|
+
data-cy="PriceSummary-DiscountSummary-label"
|
|
49
|
+
>
|
|
47
50
|
<FormattedMessage
|
|
48
51
|
id={'discountSummary.lineItemLabel'}
|
|
49
52
|
defaultMessage={'Discounts applied'}
|
|
50
53
|
/>
|
|
51
54
|
</span>
|
|
52
|
-
<span
|
|
55
|
+
<span
|
|
56
|
+
data-cy="DiscountSummary-discountValue"
|
|
57
|
+
className={classes.price}
|
|
58
|
+
>
|
|
53
59
|
{MINUS_SYMBOL}
|
|
54
60
|
<Price
|
|
55
61
|
value={discount.value}
|