@magento/venia-ui 9.2.0-beta.1 → 9.3.0-beta.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 +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 +5 -4
- package/lib/components/CartPage/PriceSummary/__tests__/giftCardSummary.spec.js +0 -84
package/lib/components/CartPage/PriceSummary/__tests__/__snapshots__/priceSummary.spec.js.snap
CHANGED
|
@@ -4,54 +4,74 @@ exports[`renders PriceSummary correctly on cart page 1`] = `
|
|
|
4
4
|
<div
|
|
5
5
|
className="root"
|
|
6
6
|
>
|
|
7
|
-
<div
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
<div>
|
|
8
|
+
<ul>
|
|
9
|
+
<li
|
|
10
|
+
className="lineItems"
|
|
11
|
+
>
|
|
12
|
+
<span
|
|
13
|
+
className="lineItemLabel"
|
|
14
|
+
>
|
|
15
|
+
<mock-FormattedMessage
|
|
16
|
+
defaultMessage="Subtotal"
|
|
17
|
+
id="priceSummary.lineItemLabel"
|
|
18
|
+
/>
|
|
19
|
+
</span>
|
|
20
|
+
<span
|
|
21
|
+
className="price"
|
|
22
|
+
>
|
|
23
|
+
<span>
|
|
24
|
+
$
|
|
25
|
+
</span>
|
|
26
|
+
<span>
|
|
27
|
+
3
|
|
28
|
+
</span>
|
|
29
|
+
<span>
|
|
30
|
+
.
|
|
31
|
+
</span>
|
|
32
|
+
<span>
|
|
33
|
+
50
|
|
34
|
+
</span>
|
|
35
|
+
</span>
|
|
36
|
+
</li>
|
|
37
|
+
<li
|
|
38
|
+
className="lineItems"
|
|
16
39
|
/>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
</
|
|
51
|
-
|
|
52
|
-
50
|
|
53
|
-
</span>
|
|
54
|
-
</span>
|
|
40
|
+
<li
|
|
41
|
+
className="lineItems"
|
|
42
|
+
/>
|
|
43
|
+
<li
|
|
44
|
+
className="lineItems"
|
|
45
|
+
/>
|
|
46
|
+
<li
|
|
47
|
+
className="lineItems"
|
|
48
|
+
/>
|
|
49
|
+
<li
|
|
50
|
+
className="lineItems"
|
|
51
|
+
>
|
|
52
|
+
<span
|
|
53
|
+
className="totalLabel"
|
|
54
|
+
>
|
|
55
|
+
Estimated Total
|
|
56
|
+
</span>
|
|
57
|
+
<span
|
|
58
|
+
className="totalPrice"
|
|
59
|
+
>
|
|
60
|
+
<span>
|
|
61
|
+
$
|
|
62
|
+
</span>
|
|
63
|
+
<span>
|
|
64
|
+
8
|
|
65
|
+
</span>
|
|
66
|
+
<span>
|
|
67
|
+
.
|
|
68
|
+
</span>
|
|
69
|
+
<span>
|
|
70
|
+
50
|
|
71
|
+
</span>
|
|
72
|
+
</span>
|
|
73
|
+
</li>
|
|
74
|
+
</ul>
|
|
55
75
|
</div>
|
|
56
76
|
<div
|
|
57
77
|
className="checkoutButton_container"
|
|
@@ -89,54 +109,74 @@ exports[`renders PriceSummary correctly on checkout page 1`] = `
|
|
|
89
109
|
<div
|
|
90
110
|
className="root"
|
|
91
111
|
>
|
|
92
|
-
<div
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
112
|
+
<div>
|
|
113
|
+
<ul>
|
|
114
|
+
<li
|
|
115
|
+
className="lineItems"
|
|
116
|
+
>
|
|
117
|
+
<span
|
|
118
|
+
className="lineItemLabel"
|
|
119
|
+
>
|
|
120
|
+
<mock-FormattedMessage
|
|
121
|
+
defaultMessage="Subtotal"
|
|
122
|
+
id="priceSummary.lineItemLabel"
|
|
123
|
+
/>
|
|
124
|
+
</span>
|
|
125
|
+
<span
|
|
126
|
+
className="price"
|
|
127
|
+
>
|
|
128
|
+
<span>
|
|
129
|
+
$
|
|
130
|
+
</span>
|
|
131
|
+
<span>
|
|
132
|
+
3
|
|
133
|
+
</span>
|
|
134
|
+
<span>
|
|
135
|
+
.
|
|
136
|
+
</span>
|
|
137
|
+
<span>
|
|
138
|
+
50
|
|
139
|
+
</span>
|
|
140
|
+
</span>
|
|
141
|
+
</li>
|
|
142
|
+
<li
|
|
143
|
+
className="lineItems"
|
|
101
144
|
/>
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
</
|
|
136
|
-
|
|
137
|
-
50
|
|
138
|
-
</span>
|
|
139
|
-
</span>
|
|
145
|
+
<li
|
|
146
|
+
className="lineItems"
|
|
147
|
+
/>
|
|
148
|
+
<li
|
|
149
|
+
className="lineItems"
|
|
150
|
+
/>
|
|
151
|
+
<li
|
|
152
|
+
className="lineItems"
|
|
153
|
+
/>
|
|
154
|
+
<li
|
|
155
|
+
className="lineItems"
|
|
156
|
+
>
|
|
157
|
+
<span
|
|
158
|
+
className="totalLabel"
|
|
159
|
+
>
|
|
160
|
+
Total
|
|
161
|
+
</span>
|
|
162
|
+
<span
|
|
163
|
+
className="totalPrice"
|
|
164
|
+
>
|
|
165
|
+
<span>
|
|
166
|
+
$
|
|
167
|
+
</span>
|
|
168
|
+
<span>
|
|
169
|
+
8
|
|
170
|
+
</span>
|
|
171
|
+
<span>
|
|
172
|
+
.
|
|
173
|
+
</span>
|
|
174
|
+
<span>
|
|
175
|
+
50
|
|
176
|
+
</span>
|
|
177
|
+
</span>
|
|
178
|
+
</li>
|
|
179
|
+
</ul>
|
|
140
180
|
</div>
|
|
141
181
|
</div>
|
|
142
182
|
`;
|
|
@@ -162,54 +202,74 @@ exports[`renders summary with loading state if query is loading 1`] = `
|
|
|
162
202
|
<div
|
|
163
203
|
className="root"
|
|
164
204
|
>
|
|
165
|
-
<div
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
205
|
+
<div>
|
|
206
|
+
<ul>
|
|
207
|
+
<li
|
|
208
|
+
className="lineItems"
|
|
209
|
+
>
|
|
210
|
+
<span
|
|
211
|
+
className="lineItemLabel"
|
|
212
|
+
>
|
|
213
|
+
<mock-FormattedMessage
|
|
214
|
+
defaultMessage="Subtotal"
|
|
215
|
+
id="priceSummary.lineItemLabel"
|
|
216
|
+
/>
|
|
217
|
+
</span>
|
|
218
|
+
<span
|
|
219
|
+
className="priceUpdating"
|
|
220
|
+
>
|
|
221
|
+
<span>
|
|
222
|
+
$
|
|
223
|
+
</span>
|
|
224
|
+
<span>
|
|
225
|
+
3
|
|
226
|
+
</span>
|
|
227
|
+
<span>
|
|
228
|
+
.
|
|
229
|
+
</span>
|
|
230
|
+
<span>
|
|
231
|
+
50
|
|
232
|
+
</span>
|
|
233
|
+
</span>
|
|
234
|
+
</li>
|
|
235
|
+
<li
|
|
236
|
+
className="lineItems"
|
|
174
237
|
/>
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
</
|
|
209
|
-
|
|
210
|
-
50
|
|
211
|
-
</span>
|
|
212
|
-
</span>
|
|
238
|
+
<li
|
|
239
|
+
className="lineItems"
|
|
240
|
+
/>
|
|
241
|
+
<li
|
|
242
|
+
className="lineItems"
|
|
243
|
+
/>
|
|
244
|
+
<li
|
|
245
|
+
className="lineItems"
|
|
246
|
+
/>
|
|
247
|
+
<li
|
|
248
|
+
className="lineItems"
|
|
249
|
+
>
|
|
250
|
+
<span
|
|
251
|
+
className="totalLabel"
|
|
252
|
+
>
|
|
253
|
+
Estimated Total
|
|
254
|
+
</span>
|
|
255
|
+
<span
|
|
256
|
+
className="priceUpdating"
|
|
257
|
+
>
|
|
258
|
+
<span>
|
|
259
|
+
$
|
|
260
|
+
</span>
|
|
261
|
+
<span>
|
|
262
|
+
8
|
|
263
|
+
</span>
|
|
264
|
+
<span>
|
|
265
|
+
.
|
|
266
|
+
</span>
|
|
267
|
+
<span>
|
|
268
|
+
50
|
|
269
|
+
</span>
|
|
270
|
+
</span>
|
|
271
|
+
</li>
|
|
272
|
+
</ul>
|
|
213
273
|
</div>
|
|
214
274
|
<div
|
|
215
275
|
className="checkoutButton_container"
|
|
@@ -15,7 +15,8 @@ const defaultProps = {
|
|
|
15
15
|
amount: {
|
|
16
16
|
value: 10,
|
|
17
17
|
currency: 'USD'
|
|
18
|
-
}
|
|
18
|
+
},
|
|
19
|
+
label: 'Special rebate'
|
|
19
20
|
}
|
|
20
21
|
]
|
|
21
22
|
};
|
|
@@ -31,18 +32,21 @@ test('renders accumulated discount value', () => {
|
|
|
31
32
|
...defaultProps,
|
|
32
33
|
data: [
|
|
33
34
|
{
|
|
35
|
+
label: 'Discount 1',
|
|
34
36
|
amount: {
|
|
35
37
|
value: 0,
|
|
36
38
|
currency: 'USD'
|
|
37
39
|
}
|
|
38
40
|
},
|
|
39
41
|
{
|
|
42
|
+
label: 'Discount 2',
|
|
40
43
|
amount: {
|
|
41
44
|
value: 1,
|
|
42
45
|
currency: 'USD'
|
|
43
46
|
}
|
|
44
47
|
},
|
|
45
48
|
{
|
|
49
|
+
label: 'Discount 3',
|
|
46
50
|
amount: {
|
|
47
51
|
value: 1,
|
|
48
52
|
currency: 'USD'
|
|
@@ -71,6 +75,7 @@ test('renders nothing if discount value is "0"', () => {
|
|
|
71
75
|
...defaultProps,
|
|
72
76
|
data: [
|
|
73
77
|
{
|
|
78
|
+
label: 'Discount 1',
|
|
74
79
|
amount: {
|
|
75
80
|
value: 0,
|
|
76
81
|
currency: 'USD'
|
|
@@ -82,3 +87,38 @@ test('renders nothing if discount value is "0"', () => {
|
|
|
82
87
|
|
|
83
88
|
expect(tree.toJSON()).toMatchSnapshot();
|
|
84
89
|
});
|
|
90
|
+
|
|
91
|
+
test('renders discount label value from data ', () => {
|
|
92
|
+
const props = {
|
|
93
|
+
...defaultProps,
|
|
94
|
+
data: [
|
|
95
|
+
{
|
|
96
|
+
amount: {
|
|
97
|
+
value: 1,
|
|
98
|
+
currency: 'USD'
|
|
99
|
+
},
|
|
100
|
+
label: 'Rebate'
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
};
|
|
104
|
+
const tree = createTestInstance(<DiscountSummary {...props} />);
|
|
105
|
+
|
|
106
|
+
expect(tree.toJSON()).toMatchSnapshot();
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
test('renders "Discount applied" label if label data is empty', () => {
|
|
110
|
+
const props = {
|
|
111
|
+
...defaultProps,
|
|
112
|
+
data: [
|
|
113
|
+
{
|
|
114
|
+
amount: {
|
|
115
|
+
value: 1,
|
|
116
|
+
currency: 'USD'
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
};
|
|
121
|
+
const tree = createTestInstance(<DiscountSummary {...props} />);
|
|
122
|
+
|
|
123
|
+
expect(tree.toJSON()).toMatchSnapshot();
|
|
124
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { createTestInstance } from '@magento/peregrine';
|
|
4
|
+
|
|
5
|
+
import GiftCardSummary from '../giftCardSummary.ce';
|
|
6
|
+
|
|
7
|
+
const Component = () => {
|
|
8
|
+
return <GiftCardSummary />;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
describe('#GiftCardSummary CE', () => {
|
|
12
|
+
it('renders', () => {
|
|
13
|
+
const tree = createTestInstance(<Component />);
|
|
14
|
+
|
|
15
|
+
expect(tree.toJSON()).toMatchSnapshot();
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createTestInstance } from '@magento/peregrine';
|
|
3
|
+
|
|
4
|
+
import GiftCardSummary from '../giftCardSummary.ee';
|
|
5
|
+
|
|
6
|
+
const defaultProps = {
|
|
7
|
+
classes: {
|
|
8
|
+
lineItemLabel: 'lineItemLabel',
|
|
9
|
+
price: 'price'
|
|
10
|
+
},
|
|
11
|
+
data: [
|
|
12
|
+
{
|
|
13
|
+
applied_balance: {
|
|
14
|
+
value: 10,
|
|
15
|
+
currency: 'USD'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
describe('#GiftCardSummary EE', () => {
|
|
22
|
+
it('renders gift card summary line item correctly', () => {
|
|
23
|
+
const tree = createTestInstance(<GiftCardSummary {...defaultProps} />);
|
|
24
|
+
|
|
25
|
+
expect(tree.toJSON()).toMatchSnapshot();
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('renders accumulated gift card value', () => {
|
|
29
|
+
const props = {
|
|
30
|
+
...defaultProps,
|
|
31
|
+
data: [
|
|
32
|
+
{
|
|
33
|
+
applied_balance: {
|
|
34
|
+
value: 0,
|
|
35
|
+
currency: 'USD'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
applied_balance: {
|
|
40
|
+
value: 1,
|
|
41
|
+
currency: 'USD'
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
applied_balance: {
|
|
46
|
+
value: 1,
|
|
47
|
+
currency: 'USD'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const tree = createTestInstance(<GiftCardSummary {...props} />);
|
|
54
|
+
|
|
55
|
+
expect(tree.toJSON()).toMatchSnapshot();
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it('renders nothing if gift card data is empty', () => {
|
|
59
|
+
const props = {
|
|
60
|
+
...defaultProps,
|
|
61
|
+
data: []
|
|
62
|
+
};
|
|
63
|
+
const tree = createTestInstance(<GiftCardSummary {...props} />);
|
|
64
|
+
|
|
65
|
+
expect(tree.toJSON()).toMatchSnapshot();
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it('renders nothing if gift card value is "0"', () => {
|
|
69
|
+
const props = {
|
|
70
|
+
...defaultProps,
|
|
71
|
+
data: [
|
|
72
|
+
{
|
|
73
|
+
applied_balance: {
|
|
74
|
+
value: 0,
|
|
75
|
+
currency: 'USD'
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
};
|
|
80
|
+
const tree = createTestInstance(<GiftCardSummary {...props} />);
|
|
81
|
+
|
|
82
|
+
expect(tree.toJSON()).toMatchSnapshot();
|
|
83
|
+
});
|
|
84
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { createTestInstance } from '@magento/peregrine';
|
|
4
|
+
|
|
5
|
+
import GiftOptionsSummary from '../giftOptionsSummary.ce';
|
|
6
|
+
|
|
7
|
+
const Component = () => {
|
|
8
|
+
return <GiftOptionsSummary />;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
describe('#GiftOptionsSummary CE', () => {
|
|
12
|
+
it('renders', () => {
|
|
13
|
+
const tree = createTestInstance(<Component />);
|
|
14
|
+
|
|
15
|
+
expect(tree.toJSON()).toMatchSnapshot();
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { createTestInstance } from '@magento/peregrine';
|
|
4
|
+
|
|
5
|
+
import GiftOptionsSummary from '../giftOptionsSummary.ee';
|
|
6
|
+
|
|
7
|
+
const defaultProps = {
|
|
8
|
+
classes: {
|
|
9
|
+
lineItemLabel: 'lineItemLabel',
|
|
10
|
+
price: 'price'
|
|
11
|
+
},
|
|
12
|
+
data: {
|
|
13
|
+
printed_card: {
|
|
14
|
+
value: 10,
|
|
15
|
+
currency: 'USD'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
describe('#GiftOptionsSummary EE', () => {
|
|
21
|
+
it('renders gift options summary line item correctly', () => {
|
|
22
|
+
const tree = createTestInstance(
|
|
23
|
+
<GiftOptionsSummary {...defaultProps} />
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
expect(tree.toJSON()).toMatchSnapshot();
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('renders accumulated gift options value', () => {
|
|
30
|
+
const props = {
|
|
31
|
+
...defaultProps,
|
|
32
|
+
data: {
|
|
33
|
+
printed_card: {
|
|
34
|
+
value: 10,
|
|
35
|
+
currency: 'USD'
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const tree = createTestInstance(<GiftOptionsSummary {...props} />);
|
|
41
|
+
|
|
42
|
+
expect(tree.toJSON()).toMatchSnapshot();
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it('renders nothing if gift options data is empty', () => {
|
|
46
|
+
const props = {
|
|
47
|
+
...defaultProps,
|
|
48
|
+
data: {}
|
|
49
|
+
};
|
|
50
|
+
const tree = createTestInstance(<GiftOptionsSummary {...props} />);
|
|
51
|
+
|
|
52
|
+
expect(tree.toJSON()).toMatchSnapshot();
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it('renders nothing if gift options value is "0"', () => {
|
|
56
|
+
const props = {
|
|
57
|
+
...defaultProps,
|
|
58
|
+
data: {
|
|
59
|
+
printed_card: {
|
|
60
|
+
value: 0,
|
|
61
|
+
currency: 'USD'
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const tree = createTestInstance(<GiftOptionsSummary {...props} />);
|
|
66
|
+
|
|
67
|
+
expect(tree.toJSON()).toMatchSnapshot();
|
|
68
|
+
});
|
|
69
|
+
});
|
|
@@ -77,6 +77,7 @@ const defaultTalonProps = {
|
|
|
77
77
|
total: { currency: 'USD', value: 8.5 },
|
|
78
78
|
discounts: null,
|
|
79
79
|
giftCards: [],
|
|
80
|
+
giftOptions: {},
|
|
80
81
|
taxes: [],
|
|
81
82
|
shipping: { currency: 'USD', value: 5 }
|
|
82
83
|
}
|
|
@@ -95,6 +96,7 @@ jest.mock(
|
|
|
95
96
|
total: { currency: 'USD', value: 8.5 },
|
|
96
97
|
discounts: null,
|
|
97
98
|
giftCards: [],
|
|
99
|
+
giftOptions: {},
|
|
98
100
|
taxes: [],
|
|
99
101
|
shipping: { currency: 'USD', value: 5 }
|
|
100
102
|
}
|