@magento/venia-ui 9.0.0 → 9.2.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/i18n/en_US.json +21 -1
  2. package/lib/RootComponents/CMS/__tests__/cms.spec.js +50 -20
  3. package/lib/RootComponents/CMS/cms.js +39 -43
  4. package/lib/RootComponents/CMS/cms.module.css +17 -14
  5. package/lib/RootComponents/Category/NoProductsFound/noProductsFound.js +1 -1
  6. package/lib/RootComponents/Category/__tests__/__snapshots__/category.spec.js.snap +2 -2
  7. package/lib/RootComponents/Category/__tests__/__snapshots__/categoryContent.spec.js.snap +60 -0
  8. package/lib/RootComponents/Category/__tests__/category.spec.js +1 -1
  9. package/lib/RootComponents/Category/__tests__/categoryContent.spec.js +8 -0
  10. package/lib/RootComponents/Category/category.gql.js +2 -1
  11. package/lib/RootComponents/Category/category.js +6 -6
  12. package/lib/RootComponents/Category/categoryContent.js +11 -4
  13. package/lib/components/Accordion/section.js +6 -2
  14. package/lib/components/AccountChip/accountChip.gql.js +1 -1
  15. package/lib/components/AccountInformationPage/accountInformationPage.gql.js +5 -7
  16. package/lib/components/AccountInformationPage/accountInformationPage.js +5 -1
  17. package/lib/components/AccountInformationPage/editForm.js +22 -4
  18. package/lib/components/AccountMenu/accountMenu.js +1 -1
  19. package/lib/components/AccountMenu/accountMenuItems.js +2 -1
  20. package/lib/components/AddressBookPage/__tests__/__snapshots__/addressCard.spec.js.snap +5 -0
  21. package/lib/components/AddressBookPage/addEditDialog.js +36 -10
  22. package/lib/components/AddressBookPage/addressBookPage.js +5 -2
  23. package/lib/components/AddressBookPage/addressCard.js +17 -4
  24. package/lib/components/App/app.js +5 -1
  25. package/lib/components/App/localeProvider.js +2 -1
  26. package/lib/components/Breadcrumbs/breadcrumbs.js +3 -3
  27. package/lib/components/Breadcrumbs/breadcrumbs.module.css +11 -3
  28. package/lib/components/CartPage/GiftCards/giftCard.js +1 -0
  29. package/lib/components/CartPage/GiftCards/giftCards.js +2 -0
  30. package/lib/components/CartPage/PriceAdjustments/CouponCode/couponCode.js +3 -0
  31. package/lib/components/CartPage/PriceAdjustments/GiftOptions/giftOptions.js +3 -0
  32. package/lib/components/CartPage/PriceAdjustments/ShippingMethods/shippingForm.js +10 -2
  33. package/lib/components/CartPage/PriceAdjustments/ShippingMethods/shippingMethods.js +2 -1
  34. package/lib/components/CartPage/PriceAdjustments/ShippingMethods/shippingRadio.js +1 -1
  35. package/lib/components/CartPage/PriceAdjustments/ShippingMethods/shippingRadios.js +1 -1
  36. package/lib/components/CartPage/PriceAdjustments/giftCardSection.ee.js +1 -0
  37. package/lib/components/CartPage/PriceAdjustments/priceAdjustments.js +4 -1
  38. package/lib/components/CartPage/PriceSummary/discountSummary.js +8 -2
  39. package/lib/components/CartPage/PriceSummary/giftCardSummary.ee.js +4 -1
  40. package/lib/components/CartPage/PriceSummary/priceSummary.js +10 -3
  41. package/lib/components/CartPage/PriceSummary/shippingSummary.js +6 -1
  42. package/lib/components/CartPage/PriceSummary/taxSummary.js +1 -1
  43. package/lib/components/CartPage/ProductListing/EditModal/__tests__/__snapshots__/productDetail.spec.js.snap +3 -3
  44. package/lib/components/CartPage/ProductListing/EditModal/__tests__/__snapshots__/productForm.spec.js.snap +2 -2
  45. package/lib/components/CartPage/ProductListing/EditModal/productDetail.js +1 -1
  46. package/lib/components/CartPage/ProductListing/__tests__/__snapshots__/errorMessage.spec.js.snap +11 -0
  47. package/lib/components/CartPage/ProductListing/__tests__/errorMessage.spec.js +20 -0
  48. package/lib/components/CartPage/ProductListing/__tests__/product.spec.js +1 -0
  49. package/lib/components/CartPage/ProductListing/errorMessage.js +31 -0
  50. package/lib/components/CartPage/ProductListing/errorMessage.module.css +9 -0
  51. package/lib/components/CartPage/ProductListing/product.js +17 -10
  52. package/lib/components/CartPage/ProductListing/productListing.js +6 -1
  53. package/lib/components/CartPage/ProductListing/productListing.module.css +6 -0
  54. package/lib/components/CartPage/ProductListing/quantity.js +3 -0
  55. package/lib/components/CartPage/cartPage.js +1 -1
  56. package/lib/components/CategoryList/__tests__/categoryList.spec.js +2 -0
  57. package/lib/components/CategoryList/categoryList.js +4 -2
  58. package/lib/components/CategoryList/categoryList.module.css +2 -0
  59. package/lib/components/CategoryList/categoryTile.js +2 -0
  60. package/lib/components/CategoryList/categoryTile.module.css +2 -0
  61. package/lib/components/CategoryList/index.js +2 -0
  62. package/lib/components/CategoryTree/categoryBranch.js +2 -1
  63. package/lib/components/CategoryTree/categoryLeaf.js +1 -0
  64. package/lib/components/CategoryTree/categoryTree.js +3 -3
  65. package/lib/components/Checkbox/checkbox.module.css +11 -3
  66. package/lib/components/Checkout/addressForm.js +2 -3
  67. package/lib/components/CheckoutPage/GuestSignIn/guestSignIn.js +6 -2
  68. package/lib/components/CheckoutPage/ItemsReview/__fixtures__/cartItems.js +12 -12
  69. package/lib/components/CheckoutPage/ItemsReview/__tests__/__snapshots__/item.spec.js.snap +2 -2
  70. package/lib/components/CheckoutPage/ItemsReview/__tests__/__snapshots__/itemsReview.spec.js.snap +3 -3
  71. package/lib/components/CheckoutPage/ItemsReview/item.js +1 -1
  72. package/lib/components/CheckoutPage/ItemsReview/itemsReview.js +4 -1
  73. package/lib/components/CheckoutPage/OrderConfirmationPage/__tests__/__snapshots__/orderConfirmationPage.spec.js.snap +1 -1
  74. package/lib/components/CheckoutPage/OrderConfirmationPage/createAccount.js +6 -0
  75. package/lib/components/CheckoutPage/OrderConfirmationPage/orderConfirmationPage.js +10 -4
  76. package/lib/components/CheckoutPage/OrderSummary/orderSummary.js +1 -1
  77. package/lib/components/CheckoutPage/PaymentInformation/braintreeSummary.js +2 -1
  78. package/lib/components/CheckoutPage/PaymentInformation/creditCard.js +11 -1
  79. package/lib/components/CheckoutPage/PaymentInformation/editCard.js +1 -1
  80. package/lib/components/CheckoutPage/PaymentInformation/editModal.js +1 -1
  81. package/lib/components/CheckoutPage/PaymentInformation/paymentInformation.js +1 -1
  82. package/lib/components/CheckoutPage/ShippingInformation/AddressForm/__tests__/__snapshots__/guestForm.spec.js.snap +8 -0
  83. package/lib/components/CheckoutPage/ShippingInformation/AddressForm/__tests__/guestForm.spec.js +56 -1
  84. package/lib/components/CheckoutPage/ShippingInformation/AddressForm/customerForm.js +27 -4
  85. package/lib/components/CheckoutPage/ShippingInformation/AddressForm/guestForm.js +96 -9
  86. package/lib/components/CheckoutPage/ShippingInformation/card.js +1 -1
  87. package/lib/components/CheckoutPage/ShippingInformation/shippingInformation.js +14 -3
  88. package/lib/components/CheckoutPage/ShippingMethod/completedView.js +1 -0
  89. package/lib/components/CheckoutPage/ShippingMethod/shippingMethod.js +2 -1
  90. package/lib/components/CheckoutPage/ShippingMethod/updateModal.js +1 -0
  91. package/lib/components/CheckoutPage/__tests__/__snapshots__/checkoutPage.spec.js.snap +32 -0
  92. package/lib/components/CheckoutPage/__tests__/checkoutPage.spec.js +2 -0
  93. package/lib/components/CheckoutPage/checkoutPage.js +26 -4
  94. package/lib/components/ContactPage/__tests__/__snapshots__/contactLink.spec.js.snap +11 -0
  95. package/lib/components/ContactPage/__tests__/__snapshots__/contactPage.shimmer.spec.js.snap +113 -0
  96. package/lib/components/ContactPage/__tests__/__snapshots__/contactPage.spec.js.snap +312 -0
  97. package/lib/components/ContactPage/__tests__/contactLink.spec.js +58 -0
  98. package/lib/components/ContactPage/__tests__/contactPage.shimmer.spec.js +20 -0
  99. package/lib/components/ContactPage/__tests__/contactPage.spec.js +159 -0
  100. package/lib/components/ContactPage/contactLink.js +21 -0
  101. package/lib/components/ContactPage/contactPage.js +270 -0
  102. package/lib/components/ContactPage/contactPage.module.css +81 -0
  103. package/lib/components/ContactPage/contactPage.shimmer.js +104 -0
  104. package/lib/components/ContactPage/contactPage.shimmer.module.css +27 -0
  105. package/lib/components/ContactPage/index.js +2 -0
  106. package/lib/components/CreateAccount/createAccount.js +5 -0
  107. package/lib/components/Dialog/dialog.js +18 -4
  108. package/lib/components/ErrorMessage/errorMessage.js +7 -2
  109. package/lib/components/ErrorView/errorView.js +4 -2
  110. package/lib/components/Field/field.module.css +10 -6
  111. package/lib/components/FilterModal/CurrentFilters/currentFilter.js +7 -3
  112. package/lib/components/FilterModal/FilterList/__tests__/filterItem.spec.js +34 -5
  113. package/lib/components/FilterModal/FilterList/filterDefault.js +3 -2
  114. package/lib/components/FilterModal/FilterList/filterItem.js +27 -7
  115. package/lib/components/FilterModal/FilterList/filterList.js +6 -1
  116. package/lib/components/FilterModal/filterBlock.js +9 -4
  117. package/lib/components/FilterModal/filterFooter.js +1 -0
  118. package/lib/components/FilterModal/filterModal.js +6 -1
  119. package/lib/components/FilterModalOpenButton/filterModalOpenButton.js +1 -0
  120. package/lib/components/FilterSidebar/filterSidebar.js +6 -1
  121. package/lib/components/Footer/__tests__/__snapshots__/footer.spec.js.snap +15 -0
  122. package/lib/components/Footer/__tests__/footer.spec.js +13 -1
  123. package/lib/components/Footer/footer.js +17 -8
  124. package/lib/components/Footer/footer.module.css +18 -3
  125. package/lib/components/Footer/sampleData.js +8 -3
  126. package/lib/components/ForgotPassword/ForgotPasswordForm/forgotPasswordForm.js +3 -0
  127. package/lib/components/ForgotPassword/FormSubmissionSuccessful/formSubmissionSuccessful.js +4 -2
  128. package/lib/components/ForgotPassword/forgotPassword.gql.js +0 -1
  129. package/lib/components/FormError/formError.js +10 -4
  130. package/lib/components/Gallery/__tests__/__snapshots__/addToCartButton.spec.js.snap +0 -3
  131. package/lib/components/Gallery/__tests__/__snapshots__/item.spec.js.snap +1 -0
  132. package/lib/components/Gallery/addToCartButton.js +27 -22
  133. package/lib/components/Gallery/item.js +16 -4
  134. package/lib/components/Gallery/item.module.css +3 -1
  135. package/lib/components/Head/index.js +2 -1
  136. package/lib/components/Header/__tests__/header.spec.js +1 -1
  137. package/lib/components/Header/accountTrigger.js +1 -0
  138. package/lib/components/Header/cartTrigger.js +4 -1
  139. package/lib/components/Header/currencySwitcher.module.css +1 -1
  140. package/lib/components/Header/header.js +1 -1
  141. package/lib/components/Header/header.module.css +100 -96
  142. package/lib/components/Header/navTrigger.js +1 -0
  143. package/lib/components/Header/searchTrigger.js +1 -0
  144. package/lib/components/LegacyMiniCart/cartOptions.gql.js +7 -6
  145. package/lib/components/LegacyMiniCart/cartOptions.js +1 -1
  146. package/lib/components/LegacyMiniCart/editFormFragment.gql.js +7 -3
  147. package/lib/components/LegacyMiniCart/kebab.js +1 -0
  148. package/lib/components/LegacyMiniCart/product.js +1 -1
  149. package/lib/components/LegacyMiniCart/productOptions.js +6 -1
  150. package/lib/components/LegacyMiniCart/section.js +15 -5
  151. package/lib/components/Link/link.js +6 -4
  152. package/lib/components/Mask/mask.js +3 -3
  153. package/lib/components/MegaMenu/__tests__/MegaMenuItem.spec.js +1 -0
  154. package/lib/components/MegaMenu/__tests__/__snapshots__/MegaMenu.spec.js.snap +9 -0
  155. package/lib/components/MegaMenu/__tests__/__snapshots__/MegaMenuItem.spec.js.snap +6 -0
  156. package/lib/components/MegaMenu/__tests__/__snapshots__/Submenu.spec.js.snap +2 -0
  157. package/lib/components/MegaMenu/megaMenu.js +6 -2
  158. package/lib/components/MegaMenu/megaMenu.module.css +8 -11
  159. package/lib/components/MegaMenu/megaMenuItem.js +27 -6
  160. package/lib/components/MegaMenu/megaMenuItem.module.css +0 -5
  161. package/lib/components/MegaMenu/submenu.js +5 -3
  162. package/lib/components/MegaMenu/submenuColumn.js +15 -4
  163. package/lib/components/MiniCart/ProductList/__tests__/__snapshots__/item.spec.js.snap +4 -4
  164. package/lib/components/MiniCart/ProductList/item.js +7 -4
  165. package/lib/components/MiniCart/ProductList/productList.js +5 -1
  166. package/lib/components/MiniCart/__tests__/__snapshots__/miniCart.spec.js.snap +1 -1
  167. package/lib/components/MiniCart/miniCart.gql.js +4 -3
  168. package/lib/components/MiniCart/miniCart.js +9 -4
  169. package/lib/components/MyAccount/ResetPassword/resetPassword.gql.js +1 -1
  170. package/lib/components/Newsletter/__tests__/__snapshots__/newsletter.shimmer.spec.js.snap +40 -0
  171. package/lib/components/Newsletter/__tests__/__snapshots__/newsletter.spec.js.snap +173 -0
  172. package/lib/components/Newsletter/__tests__/newsletter.shimmer.spec.js +10 -0
  173. package/lib/components/Newsletter/__tests__/newsletter.spec.js +143 -0
  174. package/lib/components/Newsletter/index.js +1 -0
  175. package/lib/components/Newsletter/newsletter.js +148 -0
  176. package/lib/components/Newsletter/newsletter.module.css +94 -0
  177. package/lib/components/Newsletter/newsletter.shimmer.js +46 -0
  178. package/lib/components/Newsletter/newsletter.shimmer.module.css +11 -0
  179. package/lib/components/OrderHistoryPage/OrderDetails/__tests__/__snapshots__/item.spec.js.snap +1 -1
  180. package/lib/components/OrderHistoryPage/OrderDetails/__tests__/__snapshots__/shippingMethod.spec.js.snap +3 -0
  181. package/lib/components/OrderHistoryPage/OrderDetails/billingInformation.js +4 -1
  182. package/lib/components/OrderHistoryPage/OrderDetails/item.js +1 -1
  183. package/lib/components/OrderHistoryPage/OrderDetails/items.js +1 -1
  184. package/lib/components/OrderHistoryPage/OrderDetails/paymentMethod.js +1 -1
  185. package/lib/components/OrderHistoryPage/OrderDetails/shippingInformation.js +4 -1
  186. package/lib/components/OrderHistoryPage/OrderDetails/shippingMethod.js +5 -1
  187. package/lib/components/OrderHistoryPage/orderHistoryPage.js +8 -1
  188. package/lib/components/Pagination/pagination.js +1 -1
  189. package/lib/components/Pagination/tile.js +5 -1
  190. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Boolean/__tests__/__snapshots__/boolean.spec.js.snap +20 -0
  191. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Boolean/__tests__/boolean.spec.js +52 -0
  192. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Boolean/boolean.js +74 -0
  193. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Boolean/boolean.module.css +9 -0
  194. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Boolean/index.js +1 -0
  195. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Date/__tests__/__snapshots__/date.spec.js.snap +25 -0
  196. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Date/__tests__/date.spec.js +52 -0
  197. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Date/date.js +82 -0
  198. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Date/date.module.css +9 -0
  199. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Date/index.js +1 -0
  200. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/DateTime/__tests__/__snapshots__/dateTime.spec.js.snap +29 -0
  201. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/DateTime/__tests__/dateTime.spec.js +53 -0
  202. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/DateTime/dateTime.js +85 -0
  203. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/DateTime/dateTime.module.css +9 -0
  204. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/DateTime/index.js +1 -0
  205. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Multiselect/__tests__/__snapshots__/multiSelect.spec.js.snap +36 -0
  206. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Multiselect/__tests__/multiSelect.spec.js +88 -0
  207. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Multiselect/index.js +1 -0
  208. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Multiselect/multiselect.js +99 -0
  209. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Multiselect/multiselect.module.css +13 -0
  210. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Price/__tests__/__snapshots__/price.spec.js.snap +23 -0
  211. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Price/__tests__/price.spec.js +52 -0
  212. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Price/index.js +1 -0
  213. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Price/price.js +74 -0
  214. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Price/price.module.css +9 -0
  215. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Select/__tests__/__snapshots__/select.spec.js.snap +36 -0
  216. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Select/__tests__/select.spec.js +88 -0
  217. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Select/index.js +1 -0
  218. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Select/select.js +99 -0
  219. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Select/select.module.css +13 -0
  220. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Text/__tests__/__snapshots__/text.spec.js.snap +33 -0
  221. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Text/__tests__/text.spec.js +74 -0
  222. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Text/index.js +1 -0
  223. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Text/text.js +88 -0
  224. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Text/text.module.css +13 -0
  225. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Textarea/__tests__/__snapshots__/textarea.spec.js.snap +33 -0
  226. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Textarea/__tests__/textarea.spec.js +74 -0
  227. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Textarea/index.js +1 -0
  228. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Textarea/textarea.js +88 -0
  229. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Textarea/textarea.module.css +13 -0
  230. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/__tests__/__snapshots__/attributeType.spec.js.snap +101 -0
  231. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/__tests__/attributeType.spec.js +173 -0
  232. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/attributeType.js +61 -0
  233. package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/index.js +1 -0
  234. package/lib/components/ProductFullDetail/CustomAttributes/__tests__/__snapshots__/customAttributes.spec.js.snap +49 -0
  235. package/lib/components/ProductFullDetail/CustomAttributes/__tests__/customAttributes.spec.js +78 -0
  236. package/lib/components/ProductFullDetail/CustomAttributes/customAttributes.js +66 -0
  237. package/lib/components/ProductFullDetail/CustomAttributes/customAttributes.module.css +14 -0
  238. package/lib/components/ProductFullDetail/CustomAttributes/index.js +1 -0
  239. package/lib/components/ProductFullDetail/__tests__/__snapshots__/productFullDetail.spec.js.snap +39 -0
  240. package/lib/components/ProductFullDetail/__tests__/productFullDetail.spec.js +3 -1
  241. package/lib/components/ProductFullDetail/productFullDetail.js +18 -3
  242. package/lib/components/ProductOptions/__tests__/__snapshots__/option.spec.js.snap +1 -1
  243. package/lib/components/ProductOptions/__tests__/__snapshots__/options.spec.js.snap +2 -2
  244. package/lib/components/ProductOptions/__tests__/__snapshots__/swatch.spec.js.snap +44 -2
  245. package/lib/components/ProductOptions/__tests__/__snapshots__/swatchList.spec.js.snap +22 -1
  246. package/lib/components/ProductOptions/__tests__/swatch.spec.js +0 -2
  247. package/lib/components/ProductOptions/option.js +2 -2
  248. package/lib/components/ProductOptions/swatch.js +7 -5
  249. package/lib/components/ProductOptions/swatch.module.css +11 -0
  250. package/lib/components/ProductOptions/tile.js +1 -0
  251. package/lib/components/ProductSort/__tests__/__snapshots__/sortItem.spec.js.snap +14 -0
  252. package/lib/components/ProductSort/__tests__/sortItem.spec.js +61 -0
  253. package/lib/components/ProductSort/productSort.js +84 -40
  254. package/lib/components/ProductSort/sortItem.js +26 -11
  255. package/lib/components/RadioGroup/radio.module.css +13 -5
  256. package/lib/components/RadioGroup/radioGroup.js +2 -1
  257. package/lib/components/Rating/__tests__/__snapshots__/rating.spec.js.snap +27 -0
  258. package/lib/components/Rating/__tests__/rating.spec.js +13 -0
  259. package/lib/components/Rating/index.js +1 -0
  260. package/lib/components/Rating/rating.js +30 -0
  261. package/lib/components/Rating/rating.module.css +21 -0
  262. package/lib/components/RichContent/richContent.module.css +52 -59
  263. package/lib/components/SearchBar/autocomplete.js +2 -0
  264. package/lib/components/SearchBar/searchBar.js +1 -1
  265. package/lib/components/SearchBar/searchBar.module.css +1 -0
  266. package/lib/components/SearchBar/searchField.js +1 -0
  267. package/lib/components/SearchBar/suggestedCategory.js +1 -1
  268. package/lib/components/SearchBar/suggestedProduct.js +6 -1
  269. package/lib/components/SearchPage/__tests__/__snapshots__/searchPage.spec.js.snap +195 -1
  270. package/lib/components/SearchPage/__tests__/searchPage.spec.js +13 -0
  271. package/lib/components/SearchPage/searchPage.js +20 -6
  272. package/lib/components/Shimmer/shimmer.js +11 -2
  273. package/lib/components/Shimmer/shimmer.module.css +4 -8
  274. package/lib/components/SignIn/__tests__/__snapshots__/signIn.spec.js.snap +126 -0
  275. package/lib/components/SignIn/__tests__/signIn.spec.js +11 -0
  276. package/lib/components/SignIn/signIn.gql.js +8 -4
  277. package/lib/components/SignIn/signIn.js +24 -4
  278. package/lib/components/TextArea/textArea.module.css +9 -0
  279. package/lib/components/TextInput/textInput.module.css +4 -0
  280. package/lib/components/ToastContainer/toast.js +23 -3
  281. package/lib/components/ToastContainer/toast.module.css +3 -0
  282. package/lib/components/Trigger/trigger.js +9 -2
  283. package/lib/components/Wishlist/AddToListButton/addToListButton.ee.js +1 -0
  284. package/lib/components/Wishlist/WishlistDialog/CreateWishlistForm/createWishlistForm.js +2 -0
  285. package/lib/components/Wishlist/WishlistDialog/WishlistLineItem/wishlistLineItem.js +1 -0
  286. package/lib/components/Wishlist/WishlistDialog/wishlistDialog.js +1 -0
  287. package/lib/components/WishlistPage/__tests__/__snapshots__/wishlistPage.spec.js.snap +5 -5
  288. package/lib/components/WishlistPage/createWishlist.ee.js +2 -0
  289. package/lib/components/WishlistPage/wishlist.js +8 -3
  290. package/lib/components/WishlistPage/wishlistItem.js +17 -4
  291. package/lib/components/WishlistPage/wishlistPage.js +5 -3
  292. package/lib/defaultRoutes.json +6 -0
  293. package/lib/targets/__tests__/venia-ui-targets.spec.js +2 -0
  294. package/lib/util/__tests__/shrinkGETQuery.spec.js +1 -1
  295. package/lib/util/apolloCache.js +2 -2
  296. package/lib/util/formValidators.js +10 -8
  297. package/lib/util/toCamelCase.js +3 -0
  298. package/package.json +17 -14
  299. package/upward.yml +19 -40
@@ -30,6 +30,7 @@ exports[`Submenu renders correctly it renders correctly 1`] = `
30
30
  }
31
31
  }
32
32
  categoryUrlSuffix=".html"
33
+ handleCloseSubMenu={[MockFunction handleCloseSubMenu]}
33
34
  index={0}
34
35
  keyboardProps={Object {}}
35
36
  />
@@ -44,6 +45,7 @@ exports[`Submenu renders correctly it renders correctly 1`] = `
44
45
  }
45
46
  }
46
47
  categoryUrlSuffix=".html"
48
+ handleCloseSubMenu={[MockFunction handleCloseSubMenu]}
47
49
  index={1}
48
50
  keyboardProps={
49
51
  Object {
@@ -20,7 +20,8 @@ const MegaMenu = props => {
20
20
  disableFocus,
21
21
  handleSubMenuFocus,
22
22
  categoryUrlSuffix,
23
- handleNavigate
23
+ handleNavigate,
24
+ handleClickOutside
24
25
  } = useMegaMenu({ mainNavRef });
25
26
 
26
27
  const classes = useStyle(defaultClasses, props.classes);
@@ -57,9 +58,11 @@ const MegaMenu = props => {
57
58
  categoryUrlSuffix={categoryUrlSuffix}
58
59
  mainNavWidth={mainNavWidth}
59
60
  onNavigate={handleNavigate}
60
- key={category.id}
61
+ key={category.uid}
61
62
  subMenuState={subMenuState}
62
63
  disableFocus={disableFocus}
64
+ handleSubMenuFocus={handleSubMenuFocus}
65
+ handleClickOutside={handleClickOutside}
63
66
  />
64
67
  );
65
68
  })
@@ -69,6 +72,7 @@ const MegaMenu = props => {
69
72
  <nav
70
73
  ref={mainNavRef}
71
74
  className={classes.megaMenu}
75
+ data-cy="MegaMenu-megaMenu"
72
76
  role="navigation"
73
77
  onFocus={handleSubMenuFocus}
74
78
  >
@@ -1,15 +1,12 @@
1
1
  .megaMenu {
2
- align-items: center;
3
- align-self: center;
4
- display: none;
5
- grid-column: 3 / 4;
6
- grid-row: 1 / 1;
7
- justify-content: center;
8
- margin: 0 auto;
2
+ composes: col-end-10 from global;
3
+ composes: col-start-3 from global;
4
+ composes: flex-grow from global;
5
+ composes: hidden from global;
6
+ composes: justify-self-center from global;
9
7
  }
10
8
 
11
- @media (min-width: 1024px) {
12
- .megaMenu {
13
- display: flex;
14
- }
9
+ /* Large screen styles */
10
+ .megaMenu {
11
+ composes: lg_flex from global;
15
12
  }
@@ -15,7 +15,7 @@ import Icon from '../Icon';
15
15
  * The MegaMenuItem component displays mega menu item
16
16
  *
17
17
  * @param {MegaMenuCategory} props.category
18
- * @param {int} props.activeCategoryId - id of active category
18
+ * @param {String} props.activeCategoryId - uid of active category
19
19
  * @param {int} props.mainNavWidth - width of the main nav. It's used for setting min-width of the submenu
20
20
  * @param {function} props.onNavigate - function called when clicking on Link
21
21
  */
@@ -27,7 +27,9 @@ const MegaMenuItem = props => {
27
27
  categoryUrlSuffix,
28
28
  subMenuState,
29
29
  disableFocus,
30
- onNavigate
30
+ onNavigate,
31
+ handleSubMenuFocus,
32
+ handleClickOutside
31
33
  } = props;
32
34
 
33
35
  const classes = useStyle(defaultClasses, props.classes);
@@ -45,6 +47,7 @@ const MegaMenuItem = props => {
45
47
  const {
46
48
  isFocused,
47
49
  isActive,
50
+ handleMenuItemFocus,
48
51
  handleCloseSubMenu,
49
52
  isMenuActive,
50
53
  handleKeyDown
@@ -89,13 +92,29 @@ const MegaMenuItem = props => {
89
92
  : {};
90
93
 
91
94
  return (
92
- <div className={megaMenuItemClassname}>
95
+ <div
96
+ className={megaMenuItemClassname}
97
+ data-cy="MegaMenu-MegaMenuItem-megaMenuItem"
98
+ onMouseEnter={() => {
99
+ handleSubMenuFocus();
100
+ handleMenuItemFocus();
101
+ }}
102
+ onTouchStart={() => {
103
+ handleSubMenuFocus();
104
+ handleMenuItemFocus();
105
+ }}
106
+ onMouseLeave={e => {
107
+ handleClickOutside(e);
108
+ handleCloseSubMenu();
109
+ }}
110
+ >
93
111
  <Link
94
112
  {...linkAttributes}
95
113
  onKeyDown={handleKeyDown}
96
114
  className={
97
115
  isActive ? classes.megaMenuLinkActive : classes.megaMenuLink
98
116
  }
117
+ data-cy="MegaMenu-MegaMenuItem-link"
99
118
  to={categoryUrl}
100
119
  onClick={onNavigate}
101
120
  >
@@ -112,7 +131,7 @@ export default MegaMenuItem;
112
131
  MegaMenuItem.propTypes = {
113
132
  category: PropTypes.shape({
114
133
  children: PropTypes.array,
115
- id: PropTypes.number.isRequired,
134
+ uid: PropTypes.string.isRequired,
116
135
  include_in_menu: PropTypes.number,
117
136
  isActive: PropTypes.bool.isRequired,
118
137
  name: PropTypes.string.isRequired,
@@ -120,8 +139,10 @@ MegaMenuItem.propTypes = {
120
139
  position: PropTypes.number.isRequired,
121
140
  url_path: PropTypes.string.isRequired
122
141
  }).isRequired,
123
- activeCategoryId: PropTypes.number,
142
+ activeCategoryId: PropTypes.string,
124
143
  mainNavWidth: PropTypes.number.isRequired,
125
144
  categoryUrlSuffix: PropTypes.string,
126
- onNavigate: PropTypes.func.isRequired
145
+ onNavigate: PropTypes.func.isRequired,
146
+ handleSubMenuFocus: PropTypes.func.isRequired,
147
+ handleClickOutside: PropTypes.func.isRequired
127
148
  };
@@ -13,11 +13,6 @@
13
13
  text-decoration: underline;
14
14
  }
15
15
 
16
- .megaMenuItem:hover > div,
17
- .megaMenuItem:focus > div {
18
- display: flex;
19
- }
20
-
21
16
  .megaMenuItem_active {
22
17
  composes: megaMenuItem;
23
18
  display: flex;
@@ -46,10 +46,11 @@ const Submenu = props => {
46
46
  <SubmenuColumn
47
47
  index={index}
48
48
  keyboardProps={keyboardProps}
49
- key={category.id}
49
+ key={category.uid}
50
50
  category={category}
51
51
  categoryUrlSuffix={categoryUrlSuffix}
52
52
  onNavigate={onNavigate}
53
+ handleCloseSubMenu={handleCloseSubMenu}
53
54
  />
54
55
  );
55
56
  });
@@ -72,7 +73,7 @@ Submenu.propTypes = {
72
73
  items: PropTypes.arrayOf(
73
74
  PropTypes.shape({
74
75
  children: PropTypes.array.isRequired,
75
- id: PropTypes.number.isRequired,
76
+ uid: PropTypes.string.isRequired,
76
77
  include_in_menu: PropTypes.number.isRequired,
77
78
  isActive: PropTypes.bool.isRequired,
78
79
  name: PropTypes.string.isRequired,
@@ -83,5 +84,6 @@ Submenu.propTypes = {
83
84
  ).isRequired,
84
85
  mainNavWidth: PropTypes.number.isRequired,
85
86
  categoryUrlSuffix: PropTypes.string,
86
- onNavigate: PropTypes.func.isRequired
87
+ onNavigate: PropTypes.func.isRequired,
88
+ handleCloseSubMenu: PropTypes.func.isRequired
87
89
  };
@@ -14,7 +14,12 @@ import PropTypes from 'prop-types';
14
14
  * @param {function} props.onNavigate - function called when clicking on Link
15
15
  */
16
16
  const SubmenuColumn = props => {
17
- const { category, categoryUrlSuffix, onNavigate } = props;
17
+ const {
18
+ category,
19
+ categoryUrlSuffix,
20
+ onNavigate,
21
+ handleCloseSubMenu
22
+ } = props;
18
23
  const classes = useStyle(defaultClasses, props.classes);
19
24
 
20
25
  const categoryUrl = resourceUrl(
@@ -40,6 +45,7 @@ const SubmenuColumn = props => {
40
45
  <Link
41
46
  {...keyboardProps}
42
47
  className={isActive ? classes.linkActive : classes.link}
48
+ data-cy="MegaMenu-SubmenuColumn-link"
43
49
  to={categoryUrl}
44
50
  onClick={onNavigate}
45
51
  >
@@ -60,8 +66,12 @@ const SubmenuColumn = props => {
60
66
  <Link
61
67
  {...keyboardProps}
62
68
  className={classes.link}
69
+ data-cy="MegaMenu-SubmenuColumn-link"
63
70
  to={categoryUrl}
64
- onClick={onNavigate}
71
+ onClick={() => {
72
+ handleCloseSubMenu();
73
+ onNavigate();
74
+ }}
65
75
  >
66
76
  <span className={classes.heading}>{category.name}</span>
67
77
  </Link>
@@ -75,7 +85,7 @@ export default SubmenuColumn;
75
85
  SubmenuColumn.propTypes = {
76
86
  category: PropTypes.shape({
77
87
  children: PropTypes.array,
78
- id: PropTypes.number.isRequired,
88
+ uid: PropTypes.string.isRequired,
79
89
  include_in_menu: PropTypes.number,
80
90
  isActive: PropTypes.bool.isRequired,
81
91
  name: PropTypes.string.isRequired,
@@ -84,5 +94,6 @@ SubmenuColumn.propTypes = {
84
94
  url_path: PropTypes.string.isRequired
85
95
  }).isRequired,
86
96
  categoryUrlSuffix: PropTypes.string,
87
- onNavigate: PropTypes.func.isRequired
97
+ onNavigate: PropTypes.func.isRequired,
98
+ handleCloseSubMenu: PropTypes.func.isRequired
88
99
  };
@@ -67,7 +67,7 @@ exports[`Should disable delete icon while loading 1`] = `
67
67
  className="quantity"
68
68
  >
69
69
  <mock-FormattedMessage
70
- defaultMessage="Qty :"
70
+ defaultMessage="Qty : {quantity}"
71
71
  id="productList.quantity"
72
72
  values={
73
73
  Object {
@@ -213,7 +213,7 @@ exports[`Should render correctly 1`] = `
213
213
  className="quantity"
214
214
  >
215
215
  <mock-FormattedMessage
216
- defaultMessage="Qty :"
216
+ defaultMessage="Qty : {quantity}"
217
217
  id="productList.quantity"
218
218
  values={
219
219
  Object {
@@ -359,7 +359,7 @@ exports[`Should render correctly when configured to use variant thumbnail 1`] =
359
359
  className="quantity"
360
360
  >
361
361
  <mock-FormattedMessage
362
- defaultMessage="Qty :"
362
+ defaultMessage="Qty : {quantity}"
363
363
  id="productList.quantity"
364
364
  values={
365
365
  Object {
@@ -505,7 +505,7 @@ exports[`Should render correctly with out of stock product 1`] = `
505
505
  className="quantity"
506
506
  >
507
507
  <mock-FormattedMessage
508
- defaultMessage="Qty :"
508
+ defaultMessage="Qty : {quantity}"
509
509
  id="productList.quantity"
510
510
  values={
511
511
  Object {
@@ -20,7 +20,7 @@ const Item = props => {
20
20
  const {
21
21
  classes: propClasses,
22
22
  product,
23
- id,
23
+ uid,
24
24
  quantity,
25
25
  configurable_options,
26
26
  handleRemoveItem,
@@ -45,7 +45,7 @@ const Item = props => {
45
45
  : '';
46
46
 
47
47
  const { isDeleting, removeItem } = useItem({
48
- id,
48
+ uid,
49
49
  handleRemoveItem
50
50
  });
51
51
 
@@ -53,11 +53,12 @@ const Item = props => {
53
53
  const configured_variant = configuredVariant(configurable_options, product);
54
54
 
55
55
  return (
56
- <div className={rootClass}>
56
+ <div className={rootClass} data-cy="MiniCart-Item-root">
57
57
  <Link
58
58
  className={classes.thumbnailContainer}
59
59
  to={itemLink}
60
60
  onClick={closeMiniCart}
61
+ data-cy="item-thumbnailContainer"
61
62
  >
62
63
  <Image
63
64
  alt={product.name}
@@ -77,6 +78,7 @@ const Item = props => {
77
78
  className={classes.name}
78
79
  to={itemLink}
79
80
  onClick={closeMiniCart}
81
+ data-cy="item-name"
80
82
  >
81
83
  {product.name}
82
84
  </Link>
@@ -89,7 +91,7 @@ const Item = props => {
89
91
  <span className={classes.quantity}>
90
92
  <FormattedMessage
91
93
  id={'productList.quantity'}
92
- defaultMessage={'Qty :'}
94
+ defaultMessage={'Qty : {quantity}'}
93
95
  values={{ quantity }}
94
96
  />
95
97
  </span>
@@ -109,6 +111,7 @@ const Item = props => {
109
111
  type="button"
110
112
  className={classes.deleteButton}
111
113
  disabled={isDeleting}
114
+ data-cy="MiniCart-Item-deleteButton"
112
115
  >
113
116
  <Icon
114
117
  size={16}
@@ -38,7 +38,11 @@ const ProductList = props => {
38
38
  storeUrlSuffix
39
39
  ]);
40
40
 
41
- return <div className={classes.root}>{cartItems}</div>;
41
+ return (
42
+ <div className={classes.root} data-cy="MiniCart-ProductList-root">
43
+ {cartItems}
44
+ </div>
45
+ );
42
46
  };
43
47
 
44
48
  export default ProductList;
@@ -46,7 +46,7 @@ exports[`it renders correctly 1`] = `
46
46
  className="quantity"
47
47
  >
48
48
  <mock-FormattedMessage
49
- defaultMessage="Items"
49
+ defaultMessage="{totalQuantity} Items"
50
50
  id="miniCart.totalQuantity"
51
51
  values={
52
52
  Object {
@@ -18,9 +18,10 @@ export const MINI_CART_QUERY = gql`
18
18
  `;
19
19
 
20
20
  export const REMOVE_ITEM_MUTATION = gql`
21
- mutation RemoveItemForMiniCart($cartId: String!, $itemId: Int!) {
22
- removeItemFromCart(input: { cart_id: $cartId, cart_item_id: $itemId })
23
- @connection(key: "removeItemFromCart") {
21
+ mutation RemoveItemForMiniCart($cartId: String!, $itemId: ID!) {
22
+ removeItemFromCart(
23
+ input: { cart_id: $cartId, cart_item_uid: $itemId }
24
+ ) {
24
25
  cart {
25
26
  id
26
27
  ...MiniCartFragment
@@ -83,7 +83,7 @@ const MiniCart = React.forwardRef((props, ref) => {
83
83
  <span className={quantityClassName}>
84
84
  <FormattedMessage
85
85
  id={'miniCart.totalQuantity'}
86
- defaultMessage={'Items'}
86
+ defaultMessage={'{totalQuantity} Items'}
87
87
  values={{ totalQuantity }}
88
88
  />
89
89
  </span>
@@ -104,7 +104,10 @@ const MiniCart = React.forwardRef((props, ref) => {
104
104
 
105
105
  const contents = isCartEmpty ? (
106
106
  <div className={classes.emptyCart}>
107
- <div className={classes.emptyMessage}>
107
+ <div
108
+ className={classes.emptyMessage}
109
+ data-cy="MiniCart-emptyMessage"
110
+ >
108
111
  <FormattedMessage
109
112
  id={'miniCart.emptyMessage'}
110
113
  defaultMessage={'There are no items in your cart.'}
@@ -114,7 +117,7 @@ const MiniCart = React.forwardRef((props, ref) => {
114
117
  ) : (
115
118
  <Fragment>
116
119
  <div className={classes.header}>{header}</div>
117
- <div className={classes.body}>
120
+ <div className={classes.body} data-cy="MiniCart-body">
118
121
  <ProductList
119
122
  items={productList}
120
123
  loading={loading}
@@ -130,6 +133,7 @@ const MiniCart = React.forwardRef((props, ref) => {
130
133
  priority="high"
131
134
  className={classes.checkoutButton}
132
135
  disabled={loading || isCartEmpty}
136
+ data-cy="Minicart-checkoutButton"
133
137
  >
134
138
  <Icon
135
139
  size={16}
@@ -148,6 +152,7 @@ const MiniCart = React.forwardRef((props, ref) => {
148
152
  priority="high"
149
153
  className={classes.editCartButton}
150
154
  disabled={loading || isCartEmpty}
155
+ data-cy="Minicart-editCartButton"
151
156
  >
152
157
  <FormattedMessage
153
158
  id={'miniCart.editCartButton'}
@@ -159,7 +164,7 @@ const MiniCart = React.forwardRef((props, ref) => {
159
164
  );
160
165
 
161
166
  return (
162
- <aside className={rootClass}>
167
+ <aside className={rootClass} data-cy="MiniCart-root">
163
168
  <div ref={ref} className={contentsClass}>
164
169
  {contents}
165
170
  </div>
@@ -10,7 +10,7 @@ export const RESET_PASSWORD_MUTATION = gql`
10
10
  email: $email
11
11
  resetPasswordToken: $token
12
12
  newPassword: $newPassword
13
- ) @connection(key: "resetPassword")
13
+ )
14
14
  }
15
15
  `;
16
16
 
@@ -0,0 +1,40 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`renders correctly 1`] = `
4
+ <div
5
+ className="root"
6
+ >
7
+ <div
8
+ className="root_rectangle"
9
+ style={Object {}}
10
+ />
11
+ <div
12
+ className="root_rectangle"
13
+ style={Object {}}
14
+ />
15
+ <div
16
+ className="root_rectangle"
17
+ style={
18
+ Object {
19
+ "width": "50%",
20
+ }
21
+ }
22
+ />
23
+ <div
24
+ className="form"
25
+ >
26
+ <div
27
+ className="root_textInput"
28
+ style={Object {}}
29
+ />
30
+ <div
31
+ className="buttonsContainer"
32
+ >
33
+ <div
34
+ className="root_button"
35
+ style={Object {}}
36
+ />
37
+ </div>
38
+ </div>
39
+ </div>
40
+ `;
@@ -0,0 +1,173 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`#Newsletter display it does not display when disabled 1`] = `null`;
4
+
5
+ exports[`#Newsletter display it renders shimmer while loading config 1`] = `<NewsletterShimmer />`;
6
+
7
+ exports[`#Newsletter display renders correctly 1`] = `
8
+ <div
9
+ className="root"
10
+ >
11
+ <span
12
+ className="title"
13
+ >
14
+ <mock-FormattedMessage
15
+ defaultMessage="Subscribe to Venia"
16
+ id="newsletter.titleText"
17
+ />
18
+ </span>
19
+ <p
20
+ className="newsletter_text"
21
+ >
22
+ <mock-FormattedMessage
23
+ defaultMessage="Recieve the latest news, update and special offers right to your inbox."
24
+ id="newsletter.infoText"
25
+ />
26
+ </p>
27
+ <FormError
28
+ allowErrorMessages={true}
29
+ errors={Array []}
30
+ />
31
+ <form
32
+ className="form"
33
+ onKeyDown={[Function]}
34
+ onReset={[Function]}
35
+ onSubmit={[Function]}
36
+ >
37
+ <div
38
+ className="root"
39
+ >
40
+ <label
41
+ className="label"
42
+ htmlFor="email"
43
+ >
44
+ Email
45
+ </label>
46
+ <span
47
+ className="root"
48
+ style={
49
+ Object {
50
+ "--iconsAfter": 0,
51
+ "--iconsBefore": 0,
52
+ }
53
+ }
54
+ >
55
+ <span
56
+ className="input"
57
+ >
58
+ <input
59
+ autoComplete="email"
60
+ className="input"
61
+ id="email"
62
+ name="email"
63
+ onBlur={[Function]}
64
+ onChange={[Function]}
65
+ value=""
66
+ />
67
+ </span>
68
+ <span
69
+ className="before"
70
+ />
71
+ <span
72
+ className="after"
73
+ />
74
+ </span>
75
+ <p
76
+ className="root"
77
+ />
78
+ </div>
79
+ <i />
80
+ <div
81
+ className="buttonsContainer"
82
+ >
83
+ <i />
84
+ </div>
85
+ </form>
86
+ </div>
87
+ `;
88
+
89
+ exports[`#Newsletter submit displays an error message if the email already subscribed 1`] = `
90
+ <div
91
+ className="root"
92
+ >
93
+ <span
94
+ className="title"
95
+ >
96
+ <mock-FormattedMessage
97
+ defaultMessage="Subscribe to Venia"
98
+ id="newsletter.titleText"
99
+ />
100
+ </span>
101
+ <p
102
+ className="newsletter_text"
103
+ >
104
+ <mock-FormattedMessage
105
+ defaultMessage="Recieve the latest news, update and special offers right to your inbox."
106
+ id="newsletter.infoText"
107
+ />
108
+ </p>
109
+ <FormError
110
+ allowErrorMessages={true}
111
+ errors={
112
+ Array [
113
+ "This email address is already subscribed.",
114
+ ]
115
+ }
116
+ />
117
+ <form
118
+ className="form"
119
+ onKeyDown={[Function]}
120
+ onReset={[Function]}
121
+ onSubmit={[Function]}
122
+ >
123
+ <div
124
+ className="root"
125
+ >
126
+ <label
127
+ className="label"
128
+ htmlFor="email"
129
+ >
130
+ Email
131
+ </label>
132
+ <span
133
+ className="root"
134
+ style={
135
+ Object {
136
+ "--iconsAfter": 0,
137
+ "--iconsBefore": 0,
138
+ }
139
+ }
140
+ >
141
+ <span
142
+ className="input"
143
+ >
144
+ <input
145
+ autoComplete="email"
146
+ className="input"
147
+ id="email"
148
+ name="email"
149
+ onBlur={[Function]}
150
+ onChange={[Function]}
151
+ value=""
152
+ />
153
+ </span>
154
+ <span
155
+ className="before"
156
+ />
157
+ <span
158
+ className="after"
159
+ />
160
+ </span>
161
+ <p
162
+ className="root"
163
+ />
164
+ </div>
165
+ <i />
166
+ <div
167
+ className="buttonsContainer"
168
+ >
169
+ <i />
170
+ </div>
171
+ </form>
172
+ </div>
173
+ `;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createTestInstance } from '@magento/peregrine';
3
+ import NewsletterShimmer from '../newsletter.shimmer';
4
+
5
+ jest.mock('../../../classify');
6
+
7
+ test('renders correctly', () => {
8
+ const component = createTestInstance(<NewsletterShimmer />);
9
+ expect(component.toJSON()).toMatchSnapshot();
10
+ });