@magento/venia-ui 9.2.0 → 9.3.0
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 +17 -3
- package/lib/RootComponents/CMS/__tests__/__snapshots__/cms.spec.js.snap +19 -0
- package/lib/RootComponents/CMS/__tests__/cms.spec.js +4 -9
- package/lib/RootComponents/CMS/cms.js +5 -4
- package/lib/RootComponents/CMS/cms.shimmer.js +18 -0
- package/lib/RootComponents/Category/__tests__/__snapshots__/categoryContent.shimmer.spec.js.snap +12 -0
- package/lib/RootComponents/Category/categoryContent.js +4 -1
- package/lib/components/AccountChip/accountChip.js +3 -1
- package/lib/components/AccountInformationPage/accountInformationPage.js +3 -1
- package/lib/components/AccountInformationPage/editModal.js +9 -2
- package/lib/components/AccountMenu/accountMenuItems.js +8 -3
- package/lib/components/CartPage/GiftCards/giftCards.js +1 -1
- package/lib/components/CartPage/PriceAdjustments/CouponCode/couponCode.js +5 -1
- package/lib/components/CartPage/PriceAdjustments/GiftOptions/__tests__/__snapshots__/giftOptions.spec.js.snap +1018 -78
- package/lib/components/CartPage/PriceAdjustments/GiftOptions/__tests__/giftOptions.spec.js +221 -35
- package/lib/components/CartPage/PriceAdjustments/GiftOptions/giftOptions.js +287 -40
- package/lib/components/CartPage/PriceAdjustments/GiftOptions/giftOptions.module.css +56 -1
- package/lib/components/CartPage/PriceAdjustments/__tests__/__snapshots__/giftCardSection.ee.spec.js.snap +12 -0
- package/lib/components/CartPage/PriceAdjustments/__tests__/__snapshots__/giftOptionsSection.ce.spec.js.snap +3 -0
- package/lib/components/CartPage/PriceAdjustments/__tests__/__snapshots__/giftOptionsSection.ee.spec.js.snap +16 -0
- package/lib/components/CartPage/PriceAdjustments/__tests__/__snapshots__/priceAdjustments.spec.js.snap +1 -32
- package/lib/components/CartPage/PriceAdjustments/__tests__/giftCardSection.ce.spec.js +17 -0
- package/lib/components/CartPage/PriceAdjustments/__tests__/giftCardSection.ee.spec.js +36 -0
- package/lib/components/CartPage/PriceAdjustments/__tests__/giftOptionsSection.ce.spec.js +17 -0
- package/lib/components/CartPage/PriceAdjustments/__tests__/giftOptionsSection.ee.spec.js +54 -0
- package/lib/components/CartPage/PriceAdjustments/__tests__/priceAdjustments.spec.js +1 -1
- package/lib/components/CartPage/PriceAdjustments/{giftCardSection.js → giftCardSection.ce.js} +0 -0
- package/lib/components/CartPage/PriceAdjustments/giftOptionsSection.ce.js +7 -0
- package/lib/components/CartPage/PriceAdjustments/giftOptionsSection.ee.js +38 -0
- package/lib/components/CartPage/PriceAdjustments/priceAdjustments.js +2 -14
- package/lib/components/CartPage/PriceSummary/__tests__/__snapshots__/discountSummary.spec.js.snap +496 -42
- package/lib/components/CartPage/PriceSummary/__tests__/__snapshots__/giftCardSummary.ce.spec.js.snap +3 -0
- package/lib/components/CartPage/PriceSummary/__tests__/__snapshots__/{giftCardSummary.spec.js.snap → giftCardSummary.ee.spec.js.snap} +4 -4
- package/lib/components/CartPage/PriceSummary/__tests__/__snapshots__/giftOptionsSummary.ce.spec.js.snap +3 -0
- package/lib/components/CartPage/PriceSummary/__tests__/__snapshots__/giftOptionsSummary.ee.spec.js.snap +63 -0
- package/lib/components/CartPage/PriceSummary/__tests__/__snapshots__/priceSummary.spec.js.snap +201 -141
- package/lib/components/CartPage/PriceSummary/__tests__/discountSummary.spec.js +41 -1
- package/lib/components/CartPage/PriceSummary/__tests__/giftCardSummary.ce.spec.js +17 -0
- package/lib/components/CartPage/PriceSummary/__tests__/giftCardSummary.ee.spec.js +84 -0
- package/lib/components/CartPage/PriceSummary/__tests__/giftOptionsSummary.ce.spec.js +17 -0
- package/lib/components/CartPage/PriceSummary/__tests__/giftOptionsSummary.ee.spec.js +69 -0
- package/lib/components/CartPage/PriceSummary/__tests__/priceSummary.spec.js +2 -0
- package/lib/components/CartPage/PriceSummary/discountSummary.js +99 -49
- package/lib/components/CartPage/PriceSummary/discountSummary.module.css +40 -0
- package/lib/components/CartPage/PriceSummary/giftOptionsSummary.ce.js +5 -0
- package/lib/components/CartPage/PriceSummary/giftOptionsSummary.ee.js +40 -0
- package/lib/components/CartPage/PriceSummary/priceSummary.js +95 -53
- package/lib/components/CartPage/PriceSummary/priceSummary.module.css +2 -0
- package/lib/components/CartPage/ProductListing/EditModal/__tests__/__snapshots__/productDetail.spec.js.snap +57 -0
- package/lib/components/CartPage/ProductListing/EditModal/__tests__/__snapshots__/productForm.spec.js.snap +22 -0
- package/lib/components/CartPage/ProductListing/EditModal/__tests__/productDetail.spec.js +42 -3
- package/lib/components/CartPage/ProductListing/EditModal/productDetail.js +13 -10
- package/lib/components/CartPage/ProductListing/EditModal/productForm.js +7 -2
- package/lib/components/CartPage/ProductListing/product.js +1 -0
- package/lib/components/CartPage/ProductListing/productListing.js +1 -1
- package/lib/components/CartPage/cartPage.js +1 -1
- package/lib/components/Checkbox/checkbox.js +6 -1
- package/lib/components/Checkbox/checkbox.module.css +1 -0
- package/lib/components/CheckoutPage/ItemsReview/__tests__/__snapshots__/item.spec.js.snap +2 -2
- package/lib/components/CheckoutPage/ItemsReview/__tests__/__snapshots__/itemsReview.spec.js.snap +33 -0
- package/lib/components/CheckoutPage/ItemsReview/__tests__/item.spec.js +2 -2
- package/lib/components/CheckoutPage/ItemsReview/itemsReview.js +4 -1
- package/lib/components/CheckoutPage/OrderConfirmationPage/__tests__/createAccount.spec.js +4 -0
- package/lib/components/CheckoutPage/OrderConfirmationPage/createAccount.js +9 -1
- package/lib/components/CheckoutPage/OrderConfirmationPage/orderConfirmationPage.js +12 -3
- package/lib/components/CheckoutPage/PaymentInformation/__tests__/__snapshots__/creditCard.spec.js.snap +1 -0
- package/lib/components/CheckoutPage/PaymentInformation/__tests__/creditCard.spec.js +2 -1
- package/lib/components/CheckoutPage/PaymentInformation/brainTreeDropIn.js +2 -18
- package/lib/components/CheckoutPage/PaymentInformation/creditCard.js +13 -3
- package/lib/components/CheckoutPage/PriceAdjustments/__tests__/__snapshots__/priceAdjustments.spec.js.snap +1 -6
- package/lib/components/CheckoutPage/PriceAdjustments/__tests__/priceAdjustments.spec.js +2 -2
- package/lib/components/CheckoutPage/PriceAdjustments/priceAdjustments.js +8 -12
- package/lib/components/CheckoutPage/ShippingInformation/AddressForm/customerForm.js +1 -1
- package/lib/components/CheckoutPage/ShippingInformation/shippingInformation.js +4 -1
- package/lib/components/CheckoutPage/ShippingMethod/shippingMethod.js +5 -2
- package/lib/components/CheckoutPage/__tests__/__snapshots__/checkoutPage.spec.js.snap +3 -3
- package/lib/components/CheckoutPage/__tests__/checkoutPage.spec.js +5 -0
- package/lib/components/CheckoutPage/checkoutPage.js +25 -4
- package/lib/components/CheckoutPage/checkoutPage.module.css +8 -1
- package/lib/components/CmsDynamicBlock/__tests__/__snapshots__/cmsDynamicBlock.ce.spec.js.snap +3 -0
- package/lib/components/CmsDynamicBlock/__tests__/__snapshots__/cmsDynamicBlock.ee.spec.js.snap +61 -0
- package/lib/components/CmsDynamicBlock/__tests__/__snapshots__/dynamicBlock.spec.js.snap +7 -0
- package/lib/components/CmsDynamicBlock/__tests__/cmsDynamicBlock.ce.spec.js +17 -0
- package/lib/components/CmsDynamicBlock/__tests__/cmsDynamicBlock.ee.spec.js +211 -0
- package/lib/components/CmsDynamicBlock/__tests__/constants.spec.js +37 -0
- package/lib/components/CmsDynamicBlock/__tests__/dynamicBlock.spec.js +33 -0
- package/lib/components/CmsDynamicBlock/cmsDynamicBlock.ce.js +5 -0
- package/lib/components/CmsDynamicBlock/cmsDynamicBlock.ee.js +73 -0
- package/lib/components/CmsDynamicBlock/constants.js +6 -0
- package/lib/components/CmsDynamicBlock/dynamicBlock.js +32 -0
- package/lib/components/CmsDynamicBlock/index.js +2 -0
- package/lib/components/CreateAccount/__tests__/createAccount.spec.js +6 -1
- package/lib/components/CreateAccount/createAccount.js +7 -2
- package/lib/components/Field/field.module.css +6 -0
- package/lib/components/FilterSidebar/filterSidebar.js +4 -1
- package/lib/components/Footer/__tests__/__snapshots__/footer.spec.js.snap +8 -2
- package/lib/components/Footer/footer.js +16 -9
- package/lib/components/Footer/footer.module.css +7 -2
- package/lib/components/ForgotPassword/ForgotPasswordForm/__tests__/__snapshots__/forgotPasswordForm.spec.js.snap +109 -1
- package/lib/components/ForgotPassword/ForgotPasswordForm/__tests__/forgotPasswordForm.spec.js +22 -3
- package/lib/components/ForgotPassword/ForgotPasswordForm/forgotPasswordForm.js +13 -3
- package/lib/components/ForgotPassword/ForgotPasswordForm/forgotPasswordForm.module.css +1 -1
- package/lib/components/ForgotPassword/__tests__/__snapshots__/forgotPassword.spec.js.snap +5 -6
- package/lib/components/ForgotPassword/__tests__/forgotPassword.spec.js +41 -28
- package/lib/components/ForgotPassword/forgotPassword.js +10 -3
- package/lib/components/ForgotPassword/forgotPassword.module.css +2 -2
- package/lib/components/Gallery/__tests__/__snapshots__/gallery.spec.js.snap +22 -0
- package/lib/components/Gallery/__tests__/__snapshots__/item.spec.js.snap +17 -0
- package/lib/components/Gallery/addToCartButton.js +2 -0
- package/lib/components/Gallery/gallery.js +6 -1
- package/lib/components/Gallery/item.js +7 -2
- package/lib/components/GoogleReCaptcha/googleReCaptcha.js +49 -0
- package/lib/components/GoogleReCaptcha/googleReCaptcha.module.css +3 -0
- package/lib/components/GoogleReCaptcha/index.js +1 -0
- package/lib/components/Header/currencySwitcher.js +2 -1
- package/lib/components/Header/header.js +1 -1
- package/lib/components/Header/header.module.css +2 -2
- package/lib/components/Header/searchTrigger.js +3 -1
- package/lib/components/Header/storeSwitcher.js +18 -4
- package/lib/components/Header/switcherItem.js +4 -1
- package/lib/components/HomePage/homePage.module.css +12 -0
- package/lib/components/Image/resourceImage.js +8 -1
- package/lib/components/Image/simpleImage.js +8 -1
- package/lib/components/Link/link.js +15 -13
- package/lib/components/LoadingIndicator/spinner.js +5 -7
- package/lib/components/LoadingIndicator/spinner.module.css +4 -17
- package/lib/components/MiniCart/ProductList/__tests__/__snapshots__/item.spec.js.snap +44 -0
- package/lib/components/MiniCart/ProductList/__tests__/item.spec.js +2 -2
- package/lib/components/MiniCart/ProductList/item.js +3 -2
- package/lib/components/MiniCart/miniCart.js +6 -3
- package/lib/components/MyAccount/ResetPassword/__tests__/__snapshots__/resetPassword.spec.js.snap +274 -254
- package/lib/components/MyAccount/ResetPassword/__tests__/resetPassword.spec.js +10 -5
- package/lib/components/MyAccount/ResetPassword/resetPassword.js +55 -55
- package/lib/components/MyAccount/ResetPassword/resetPassword.module.css +27 -79
- package/lib/components/Newsletter/newsletter.js +6 -2
- package/lib/components/OrderHistoryPage/OrderDetails/__tests__/__snapshots__/item.spec.js.snap +11 -0
- package/lib/components/ProductFullDetail/productFullDetail.js +12 -3
- package/lib/components/ProductImageCarousel/__tests__/__snapshots__/carousel.spec.js.snap +61 -0
- package/lib/components/ProductImageCarousel/__tests__/__snapshots__/thumbnail.spec.js.snap +26 -0
- package/lib/components/ProductOptions/__tests__/options.spec.js +1 -1
- package/lib/components/ProductOptions/__tests__/swatch.spec.js +1 -1
- package/lib/components/ProductOptions/__tests__/swatchList.spec.js +1 -1
- package/lib/components/ProductOptions/__tests__/tile.spec.js +1 -1
- package/lib/components/ProductOptions/__tests__/tileList.spec.js +1 -1
- package/lib/components/ProductOptions/option.js +4 -1
- package/lib/components/ProductSort/productSort.js +22 -14
- package/lib/components/Rating/rating.js +1 -1
- package/lib/components/SearchBar/__tests__/__snapshots__/suggestedProduct.spec.js.snap +11 -0
- package/lib/components/SearchBar/autocomplete.js +4 -2
- package/lib/components/SearchBar/suggestedProduct.js +1 -1
- package/lib/components/SearchBar/suggestions.js +1 -1
- package/lib/components/SignIn/__tests__/signIn.spec.js +11 -20
- package/lib/components/SignIn/signIn.js +6 -16
- package/lib/components/TextInput/textInput.module.css +0 -4
- package/lib/components/Wishlist/WishlistDialog/WishlistLineItem/__tests__/__snapshots__/wishlistLineItem.spec.js.snap +5 -1
- package/lib/components/Wishlist/WishlistDialog/WishlistLineItem/wishlistLineItem.js +7 -1
- package/lib/components/Wishlist/WishlistDialog/WishlistLineItem/wishlistLineItem.module.css +7 -0
- package/lib/components/Wishlist/WishlistDialog/__tests__/__snapshots__/wishlistDialog.spec.js.snap +6 -1
- package/lib/components/WishlistPage/__tests__/__snapshots__/wishlist.spec.js.snap +4 -0
- package/lib/components/WishlistPage/__tests__/__snapshots__/wishlistItem.spec.js.snap +22 -0
- package/lib/components/WishlistPage/__tests__/__snapshots__/wishlistPage.spec.js.snap +9 -3
- package/lib/components/WishlistPage/createWishlist.ee.js +3 -1
- package/lib/components/WishlistPage/wishlist.js +1 -1
- package/lib/components/WishlistPage/wishlist.module.css +3 -0
- package/lib/components/WishlistPage/wishlistPage.js +1 -1
- package/package.json +4 -3
- package/lib/components/CartPage/PriceSummary/__tests__/giftCardSummary.spec.js +0 -84
package/lib/components/MyAccount/ResetPassword/__tests__/__snapshots__/resetPassword.spec.js.snap
CHANGED
|
@@ -6,7 +6,10 @@ exports[`should render error message if token is falsy 1`] = `
|
|
|
6
6
|
Reset Password
|
|
7
7
|
</mock-StoreTitle>
|
|
8
8
|
<h1>
|
|
9
|
-
|
|
9
|
+
<mock-FormattedMessage
|
|
10
|
+
defaultMessage="Reset Password"
|
|
11
|
+
id="resetPassword.header"
|
|
12
|
+
/>
|
|
10
13
|
</h1>
|
|
11
14
|
<div>
|
|
12
15
|
<div>
|
|
@@ -25,137 +28,144 @@ exports[`should render formErrors 1`] = `
|
|
|
25
28
|
Reset Password
|
|
26
29
|
</mock-StoreTitle>
|
|
27
30
|
<h1>
|
|
28
|
-
|
|
31
|
+
<mock-FormattedMessage
|
|
32
|
+
defaultMessage="Reset Password"
|
|
33
|
+
id="resetPassword.header"
|
|
34
|
+
/>
|
|
29
35
|
</h1>
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
onReset={[Function]}
|
|
33
|
-
onSubmit={[Function]}
|
|
34
|
-
>
|
|
35
|
-
<div>
|
|
36
|
-
<mock-FormattedMessage
|
|
37
|
-
defaultMessage="Please enter your email address and new password."
|
|
38
|
-
id="resetPassword.descriptionText"
|
|
39
|
-
/>
|
|
40
|
-
</div>
|
|
41
|
-
<div>
|
|
42
|
-
<label>
|
|
43
|
-
Email address
|
|
44
|
-
</label>
|
|
45
|
-
<span
|
|
46
|
-
style={
|
|
47
|
-
Object {
|
|
48
|
-
"--iconsAfter": 0,
|
|
49
|
-
"--iconsBefore": 0,
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
>
|
|
53
|
-
<span>
|
|
54
|
-
<input
|
|
55
|
-
id="email"
|
|
56
|
-
name="email"
|
|
57
|
-
onBlur={[Function]}
|
|
58
|
-
onChange={[Function]}
|
|
59
|
-
value=""
|
|
60
|
-
/>
|
|
61
|
-
</span>
|
|
62
|
-
<span />
|
|
63
|
-
<span />
|
|
64
|
-
</span>
|
|
65
|
-
<p />
|
|
66
|
-
</div>
|
|
67
|
-
<div>
|
|
68
|
-
<label>
|
|
69
|
-
New Password
|
|
70
|
-
</label>
|
|
71
|
-
<span
|
|
72
|
-
style={
|
|
73
|
-
Object {
|
|
74
|
-
"--iconsAfter": 1,
|
|
75
|
-
"--iconsBefore": 0,
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
>
|
|
79
|
-
<span>
|
|
80
|
-
<input
|
|
81
|
-
id="newPassword"
|
|
82
|
-
name="newPassword"
|
|
83
|
-
onBlur={[Function]}
|
|
84
|
-
onChange={[Function]}
|
|
85
|
-
type="password"
|
|
86
|
-
value=""
|
|
87
|
-
/>
|
|
88
|
-
</span>
|
|
89
|
-
<span />
|
|
90
|
-
<span>
|
|
91
|
-
<button
|
|
92
|
-
disabled={false}
|
|
93
|
-
onClick={[Function]}
|
|
94
|
-
onDragStart={[Function]}
|
|
95
|
-
onKeyDown={[Function]}
|
|
96
|
-
onKeyUp={[Function]}
|
|
97
|
-
onMouseDown={[Function]}
|
|
98
|
-
onMouseEnter={[Function]}
|
|
99
|
-
onMouseLeave={[Function]}
|
|
100
|
-
onMouseUp={[Function]}
|
|
101
|
-
onTouchCancel={[Function]}
|
|
102
|
-
onTouchEnd={[Function]}
|
|
103
|
-
onTouchMove={[Function]}
|
|
104
|
-
onTouchStart={[Function]}
|
|
105
|
-
type="button"
|
|
106
|
-
>
|
|
107
|
-
<span>
|
|
108
|
-
<svg
|
|
109
|
-
fill="none"
|
|
110
|
-
height={24}
|
|
111
|
-
stroke="currentColor"
|
|
112
|
-
strokeLinecap="round"
|
|
113
|
-
strokeLinejoin="round"
|
|
114
|
-
strokeWidth="2"
|
|
115
|
-
viewBox="0 0 24 24"
|
|
116
|
-
width={24}
|
|
117
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
118
|
-
>
|
|
119
|
-
<path
|
|
120
|
-
d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"
|
|
121
|
-
/>
|
|
122
|
-
<line
|
|
123
|
-
x1="1"
|
|
124
|
-
x2="23"
|
|
125
|
-
y1="1"
|
|
126
|
-
y2="23"
|
|
127
|
-
/>
|
|
128
|
-
</svg>
|
|
129
|
-
</span>
|
|
130
|
-
</button>
|
|
131
|
-
</span>
|
|
132
|
-
</span>
|
|
133
|
-
<p />
|
|
134
|
-
</div>
|
|
135
|
-
<button
|
|
136
|
-
disabled={false}
|
|
137
|
-
onClick={[Function]}
|
|
138
|
-
onDragStart={[Function]}
|
|
36
|
+
<div>
|
|
37
|
+
<form
|
|
139
38
|
onKeyDown={[Function]}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
onMouseEnter={[Function]}
|
|
143
|
-
onMouseLeave={[Function]}
|
|
144
|
-
onMouseUp={[Function]}
|
|
145
|
-
onTouchCancel={[Function]}
|
|
146
|
-
onTouchEnd={[Function]}
|
|
147
|
-
onTouchMove={[Function]}
|
|
148
|
-
onTouchStart={[Function]}
|
|
149
|
-
type="submit"
|
|
39
|
+
onReset={[Function]}
|
|
40
|
+
onSubmit={[Function]}
|
|
150
41
|
>
|
|
151
|
-
<
|
|
42
|
+
<div>
|
|
152
43
|
<mock-FormattedMessage
|
|
153
|
-
defaultMessage="
|
|
154
|
-
id="resetPassword.
|
|
44
|
+
defaultMessage="Please enter your email address and new password."
|
|
45
|
+
id="resetPassword.descriptionText"
|
|
155
46
|
/>
|
|
156
|
-
</
|
|
157
|
-
|
|
158
|
-
|
|
47
|
+
</div>
|
|
48
|
+
<div>
|
|
49
|
+
<label>
|
|
50
|
+
Email address
|
|
51
|
+
</label>
|
|
52
|
+
<span
|
|
53
|
+
style={
|
|
54
|
+
Object {
|
|
55
|
+
"--iconsAfter": 0,
|
|
56
|
+
"--iconsBefore": 0,
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
>
|
|
60
|
+
<span>
|
|
61
|
+
<input
|
|
62
|
+
id="email"
|
|
63
|
+
name="email"
|
|
64
|
+
onBlur={[Function]}
|
|
65
|
+
onChange={[Function]}
|
|
66
|
+
value=""
|
|
67
|
+
/>
|
|
68
|
+
</span>
|
|
69
|
+
<span />
|
|
70
|
+
<span />
|
|
71
|
+
</span>
|
|
72
|
+
<p />
|
|
73
|
+
</div>
|
|
74
|
+
<div>
|
|
75
|
+
<label>
|
|
76
|
+
New Password
|
|
77
|
+
</label>
|
|
78
|
+
<span
|
|
79
|
+
style={
|
|
80
|
+
Object {
|
|
81
|
+
"--iconsAfter": 1,
|
|
82
|
+
"--iconsBefore": 0,
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
>
|
|
86
|
+
<span>
|
|
87
|
+
<input
|
|
88
|
+
id="newPassword"
|
|
89
|
+
name="newPassword"
|
|
90
|
+
onBlur={[Function]}
|
|
91
|
+
onChange={[Function]}
|
|
92
|
+
type="password"
|
|
93
|
+
value=""
|
|
94
|
+
/>
|
|
95
|
+
</span>
|
|
96
|
+
<span />
|
|
97
|
+
<span>
|
|
98
|
+
<button
|
|
99
|
+
disabled={false}
|
|
100
|
+
onClick={[Function]}
|
|
101
|
+
onDragStart={[Function]}
|
|
102
|
+
onKeyDown={[Function]}
|
|
103
|
+
onKeyUp={[Function]}
|
|
104
|
+
onMouseDown={[Function]}
|
|
105
|
+
onMouseEnter={[Function]}
|
|
106
|
+
onMouseLeave={[Function]}
|
|
107
|
+
onMouseUp={[Function]}
|
|
108
|
+
onTouchCancel={[Function]}
|
|
109
|
+
onTouchEnd={[Function]}
|
|
110
|
+
onTouchMove={[Function]}
|
|
111
|
+
onTouchStart={[Function]}
|
|
112
|
+
type="button"
|
|
113
|
+
>
|
|
114
|
+
<span>
|
|
115
|
+
<svg
|
|
116
|
+
fill="none"
|
|
117
|
+
height={24}
|
|
118
|
+
stroke="currentColor"
|
|
119
|
+
strokeLinecap="round"
|
|
120
|
+
strokeLinejoin="round"
|
|
121
|
+
strokeWidth="2"
|
|
122
|
+
viewBox="0 0 24 24"
|
|
123
|
+
width={24}
|
|
124
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
125
|
+
>
|
|
126
|
+
<path
|
|
127
|
+
d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"
|
|
128
|
+
/>
|
|
129
|
+
<line
|
|
130
|
+
x1="1"
|
|
131
|
+
x2="23"
|
|
132
|
+
y1="1"
|
|
133
|
+
y2="23"
|
|
134
|
+
/>
|
|
135
|
+
</svg>
|
|
136
|
+
</span>
|
|
137
|
+
</button>
|
|
138
|
+
</span>
|
|
139
|
+
</span>
|
|
140
|
+
<p />
|
|
141
|
+
</div>
|
|
142
|
+
<div>
|
|
143
|
+
<button
|
|
144
|
+
disabled={false}
|
|
145
|
+
onClick={[Function]}
|
|
146
|
+
onDragStart={[Function]}
|
|
147
|
+
onKeyDown={[Function]}
|
|
148
|
+
onKeyUp={[Function]}
|
|
149
|
+
onMouseDown={[Function]}
|
|
150
|
+
onMouseEnter={[Function]}
|
|
151
|
+
onMouseLeave={[Function]}
|
|
152
|
+
onMouseUp={[Function]}
|
|
153
|
+
onTouchCancel={[Function]}
|
|
154
|
+
onTouchEnd={[Function]}
|
|
155
|
+
onTouchMove={[Function]}
|
|
156
|
+
onTouchStart={[Function]}
|
|
157
|
+
type="submit"
|
|
158
|
+
>
|
|
159
|
+
<span>
|
|
160
|
+
<mock-FormattedMessage
|
|
161
|
+
defaultMessage="Save Password"
|
|
162
|
+
id="resetPassword.savePassword"
|
|
163
|
+
/>
|
|
164
|
+
</span>
|
|
165
|
+
</button>
|
|
166
|
+
</div>
|
|
167
|
+
</form>
|
|
168
|
+
</div>
|
|
159
169
|
</div>
|
|
160
170
|
`;
|
|
161
171
|
|
|
@@ -165,137 +175,144 @@ exports[`should render properly 1`] = `
|
|
|
165
175
|
Reset Password
|
|
166
176
|
</mock-StoreTitle>
|
|
167
177
|
<h1>
|
|
168
|
-
|
|
178
|
+
<mock-FormattedMessage
|
|
179
|
+
defaultMessage="Reset Password"
|
|
180
|
+
id="resetPassword.header"
|
|
181
|
+
/>
|
|
169
182
|
</h1>
|
|
170
|
-
<
|
|
171
|
-
|
|
172
|
-
onReset={[Function]}
|
|
173
|
-
onSubmit={[Function]}
|
|
174
|
-
>
|
|
175
|
-
<div>
|
|
176
|
-
<mock-FormattedMessage
|
|
177
|
-
defaultMessage="Please enter your email address and new password."
|
|
178
|
-
id="resetPassword.descriptionText"
|
|
179
|
-
/>
|
|
180
|
-
</div>
|
|
181
|
-
<div>
|
|
182
|
-
<label>
|
|
183
|
-
Email address
|
|
184
|
-
</label>
|
|
185
|
-
<span
|
|
186
|
-
style={
|
|
187
|
-
Object {
|
|
188
|
-
"--iconsAfter": 0,
|
|
189
|
-
"--iconsBefore": 0,
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
>
|
|
193
|
-
<span>
|
|
194
|
-
<input
|
|
195
|
-
id="email"
|
|
196
|
-
name="email"
|
|
197
|
-
onBlur={[Function]}
|
|
198
|
-
onChange={[Function]}
|
|
199
|
-
value=""
|
|
200
|
-
/>
|
|
201
|
-
</span>
|
|
202
|
-
<span />
|
|
203
|
-
<span />
|
|
204
|
-
</span>
|
|
205
|
-
<p />
|
|
206
|
-
</div>
|
|
207
|
-
<div>
|
|
208
|
-
<label>
|
|
209
|
-
New Password
|
|
210
|
-
</label>
|
|
211
|
-
<span
|
|
212
|
-
style={
|
|
213
|
-
Object {
|
|
214
|
-
"--iconsAfter": 1,
|
|
215
|
-
"--iconsBefore": 0,
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
>
|
|
219
|
-
<span>
|
|
220
|
-
<input
|
|
221
|
-
id="newPassword"
|
|
222
|
-
name="newPassword"
|
|
223
|
-
onBlur={[Function]}
|
|
224
|
-
onChange={[Function]}
|
|
225
|
-
type="password"
|
|
226
|
-
value=""
|
|
227
|
-
/>
|
|
228
|
-
</span>
|
|
229
|
-
<span />
|
|
230
|
-
<span>
|
|
231
|
-
<button
|
|
232
|
-
disabled={false}
|
|
233
|
-
onClick={[Function]}
|
|
234
|
-
onDragStart={[Function]}
|
|
235
|
-
onKeyDown={[Function]}
|
|
236
|
-
onKeyUp={[Function]}
|
|
237
|
-
onMouseDown={[Function]}
|
|
238
|
-
onMouseEnter={[Function]}
|
|
239
|
-
onMouseLeave={[Function]}
|
|
240
|
-
onMouseUp={[Function]}
|
|
241
|
-
onTouchCancel={[Function]}
|
|
242
|
-
onTouchEnd={[Function]}
|
|
243
|
-
onTouchMove={[Function]}
|
|
244
|
-
onTouchStart={[Function]}
|
|
245
|
-
type="button"
|
|
246
|
-
>
|
|
247
|
-
<span>
|
|
248
|
-
<svg
|
|
249
|
-
fill="none"
|
|
250
|
-
height={24}
|
|
251
|
-
stroke="currentColor"
|
|
252
|
-
strokeLinecap="round"
|
|
253
|
-
strokeLinejoin="round"
|
|
254
|
-
strokeWidth="2"
|
|
255
|
-
viewBox="0 0 24 24"
|
|
256
|
-
width={24}
|
|
257
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
258
|
-
>
|
|
259
|
-
<path
|
|
260
|
-
d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"
|
|
261
|
-
/>
|
|
262
|
-
<line
|
|
263
|
-
x1="1"
|
|
264
|
-
x2="23"
|
|
265
|
-
y1="1"
|
|
266
|
-
y2="23"
|
|
267
|
-
/>
|
|
268
|
-
</svg>
|
|
269
|
-
</span>
|
|
270
|
-
</button>
|
|
271
|
-
</span>
|
|
272
|
-
</span>
|
|
273
|
-
<p />
|
|
274
|
-
</div>
|
|
275
|
-
<button
|
|
276
|
-
disabled={false}
|
|
277
|
-
onClick={[Function]}
|
|
278
|
-
onDragStart={[Function]}
|
|
183
|
+
<div>
|
|
184
|
+
<form
|
|
279
185
|
onKeyDown={[Function]}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
onMouseEnter={[Function]}
|
|
283
|
-
onMouseLeave={[Function]}
|
|
284
|
-
onMouseUp={[Function]}
|
|
285
|
-
onTouchCancel={[Function]}
|
|
286
|
-
onTouchEnd={[Function]}
|
|
287
|
-
onTouchMove={[Function]}
|
|
288
|
-
onTouchStart={[Function]}
|
|
289
|
-
type="submit"
|
|
186
|
+
onReset={[Function]}
|
|
187
|
+
onSubmit={[Function]}
|
|
290
188
|
>
|
|
291
|
-
<
|
|
189
|
+
<div>
|
|
292
190
|
<mock-FormattedMessage
|
|
293
|
-
defaultMessage="
|
|
294
|
-
id="resetPassword.
|
|
191
|
+
defaultMessage="Please enter your email address and new password."
|
|
192
|
+
id="resetPassword.descriptionText"
|
|
295
193
|
/>
|
|
296
|
-
</
|
|
297
|
-
|
|
298
|
-
|
|
194
|
+
</div>
|
|
195
|
+
<div>
|
|
196
|
+
<label>
|
|
197
|
+
Email address
|
|
198
|
+
</label>
|
|
199
|
+
<span
|
|
200
|
+
style={
|
|
201
|
+
Object {
|
|
202
|
+
"--iconsAfter": 0,
|
|
203
|
+
"--iconsBefore": 0,
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
>
|
|
207
|
+
<span>
|
|
208
|
+
<input
|
|
209
|
+
id="email"
|
|
210
|
+
name="email"
|
|
211
|
+
onBlur={[Function]}
|
|
212
|
+
onChange={[Function]}
|
|
213
|
+
value=""
|
|
214
|
+
/>
|
|
215
|
+
</span>
|
|
216
|
+
<span />
|
|
217
|
+
<span />
|
|
218
|
+
</span>
|
|
219
|
+
<p />
|
|
220
|
+
</div>
|
|
221
|
+
<div>
|
|
222
|
+
<label>
|
|
223
|
+
New Password
|
|
224
|
+
</label>
|
|
225
|
+
<span
|
|
226
|
+
style={
|
|
227
|
+
Object {
|
|
228
|
+
"--iconsAfter": 1,
|
|
229
|
+
"--iconsBefore": 0,
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
>
|
|
233
|
+
<span>
|
|
234
|
+
<input
|
|
235
|
+
id="newPassword"
|
|
236
|
+
name="newPassword"
|
|
237
|
+
onBlur={[Function]}
|
|
238
|
+
onChange={[Function]}
|
|
239
|
+
type="password"
|
|
240
|
+
value=""
|
|
241
|
+
/>
|
|
242
|
+
</span>
|
|
243
|
+
<span />
|
|
244
|
+
<span>
|
|
245
|
+
<button
|
|
246
|
+
disabled={false}
|
|
247
|
+
onClick={[Function]}
|
|
248
|
+
onDragStart={[Function]}
|
|
249
|
+
onKeyDown={[Function]}
|
|
250
|
+
onKeyUp={[Function]}
|
|
251
|
+
onMouseDown={[Function]}
|
|
252
|
+
onMouseEnter={[Function]}
|
|
253
|
+
onMouseLeave={[Function]}
|
|
254
|
+
onMouseUp={[Function]}
|
|
255
|
+
onTouchCancel={[Function]}
|
|
256
|
+
onTouchEnd={[Function]}
|
|
257
|
+
onTouchMove={[Function]}
|
|
258
|
+
onTouchStart={[Function]}
|
|
259
|
+
type="button"
|
|
260
|
+
>
|
|
261
|
+
<span>
|
|
262
|
+
<svg
|
|
263
|
+
fill="none"
|
|
264
|
+
height={24}
|
|
265
|
+
stroke="currentColor"
|
|
266
|
+
strokeLinecap="round"
|
|
267
|
+
strokeLinejoin="round"
|
|
268
|
+
strokeWidth="2"
|
|
269
|
+
viewBox="0 0 24 24"
|
|
270
|
+
width={24}
|
|
271
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
272
|
+
>
|
|
273
|
+
<path
|
|
274
|
+
d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"
|
|
275
|
+
/>
|
|
276
|
+
<line
|
|
277
|
+
x1="1"
|
|
278
|
+
x2="23"
|
|
279
|
+
y1="1"
|
|
280
|
+
y2="23"
|
|
281
|
+
/>
|
|
282
|
+
</svg>
|
|
283
|
+
</span>
|
|
284
|
+
</button>
|
|
285
|
+
</span>
|
|
286
|
+
</span>
|
|
287
|
+
<p />
|
|
288
|
+
</div>
|
|
289
|
+
<div>
|
|
290
|
+
<button
|
|
291
|
+
disabled={false}
|
|
292
|
+
onClick={[Function]}
|
|
293
|
+
onDragStart={[Function]}
|
|
294
|
+
onKeyDown={[Function]}
|
|
295
|
+
onKeyUp={[Function]}
|
|
296
|
+
onMouseDown={[Function]}
|
|
297
|
+
onMouseEnter={[Function]}
|
|
298
|
+
onMouseLeave={[Function]}
|
|
299
|
+
onMouseUp={[Function]}
|
|
300
|
+
onTouchCancel={[Function]}
|
|
301
|
+
onTouchEnd={[Function]}
|
|
302
|
+
onTouchMove={[Function]}
|
|
303
|
+
onTouchStart={[Function]}
|
|
304
|
+
type="submit"
|
|
305
|
+
>
|
|
306
|
+
<span>
|
|
307
|
+
<mock-FormattedMessage
|
|
308
|
+
defaultMessage="Save Password"
|
|
309
|
+
id="resetPassword.savePassword"
|
|
310
|
+
/>
|
|
311
|
+
</span>
|
|
312
|
+
</button>
|
|
313
|
+
</div>
|
|
314
|
+
</form>
|
|
315
|
+
</div>
|
|
299
316
|
</div>
|
|
300
317
|
`;
|
|
301
318
|
|
|
@@ -305,7 +322,10 @@ exports[`should render success message if hasCompleted is true 1`] = `
|
|
|
305
322
|
Reset Password
|
|
306
323
|
</mock-StoreTitle>
|
|
307
324
|
<h1>
|
|
308
|
-
|
|
325
|
+
<mock-FormattedMessage
|
|
326
|
+
defaultMessage="Reset Password"
|
|
327
|
+
id="resetPassword.header"
|
|
328
|
+
/>
|
|
309
329
|
</h1>
|
|
310
330
|
<div>
|
|
311
331
|
<div>
|
|
@@ -15,7 +15,8 @@ jest.mock('@magento/peregrine/lib/talons/MyAccount/useResetPassword', () => ({
|
|
|
15
15
|
loading: false,
|
|
16
16
|
token: '********',
|
|
17
17
|
formErrors: [],
|
|
18
|
-
handleSubmit: jest.fn().mockName('handleSubmit')
|
|
18
|
+
handleSubmit: jest.fn().mockName('handleSubmit'),
|
|
19
|
+
recaptchaWidgetProps: {}
|
|
19
20
|
})
|
|
20
21
|
}));
|
|
21
22
|
|
|
@@ -35,7 +36,8 @@ test('should render error message if token is falsy', () => {
|
|
|
35
36
|
loading: false,
|
|
36
37
|
token: null,
|
|
37
38
|
formErrors: [],
|
|
38
|
-
handleSubmit: jest.fn()
|
|
39
|
+
handleSubmit: jest.fn(),
|
|
40
|
+
recaptchaWidgetProps: {}
|
|
39
41
|
});
|
|
40
42
|
|
|
41
43
|
const tree = createTestInstance(<ResetPassword />);
|
|
@@ -55,7 +57,8 @@ test('should render formErrors', () => {
|
|
|
55
57
|
}
|
|
56
58
|
}
|
|
57
59
|
],
|
|
58
|
-
handleSubmit: jest.fn()
|
|
60
|
+
handleSubmit: jest.fn(),
|
|
61
|
+
recaptchaWidgetProps: {}
|
|
59
62
|
});
|
|
60
63
|
|
|
61
64
|
const tree = createTestInstance(<ResetPassword />);
|
|
@@ -69,7 +72,8 @@ test('should render success message if hasCompleted is true', () => {
|
|
|
69
72
|
loading: false,
|
|
70
73
|
token: '**********',
|
|
71
74
|
formErrors: [],
|
|
72
|
-
handleSubmit: jest.fn()
|
|
75
|
+
handleSubmit: jest.fn(),
|
|
76
|
+
recaptchaWidgetProps: {}
|
|
73
77
|
});
|
|
74
78
|
|
|
75
79
|
const tree = createTestInstance(<ResetPassword />);
|
|
@@ -85,7 +89,8 @@ test('should render toast if hasCompleted is true', () => {
|
|
|
85
89
|
loading: false,
|
|
86
90
|
token: '**********',
|
|
87
91
|
formErrors: [],
|
|
88
|
-
handleSubmit: jest.fn()
|
|
92
|
+
handleSubmit: jest.fn(),
|
|
93
|
+
recaptchaWidgetProps: {}
|
|
89
94
|
});
|
|
90
95
|
|
|
91
96
|
createTestInstance(<ResetPassword />);
|