@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
package/i18n/en_US.json CHANGED
@@ -104,6 +104,9 @@
104
104
  "checkoutPage.step4": "Saved Credit Card Information Successfully",
105
105
  "checkoutPage.stockStatusMessage": "An item in your cart is currently out-of-stock and must be removed in order to Checkout. Please return to your cart to remove the item.",
106
106
  "checkoutPage.subscribe": "Subscribe to news and updates",
107
+ "checkoutPage.suggestSignInConfirmMessage": "Yes, sign in",
108
+ "checkoutPage.suggestSignInDeclineMessage": "No, thanks",
109
+ "checkoutPage.suggestSignInMessage'": "The email you provided is associated with an existing Venia account. Would you like to sign into this account?",
107
110
  "checkoutPage.thankYou": "Thank you for your order!",
108
111
  "checkoutPage.titleCheckout": "Checkout",
109
112
  "checkoutPage.titleReceipt": "Receipt",
@@ -120,6 +123,15 @@
120
123
  "completedView.errorLoading": "Error loading selected shipping method. Please select again.",
121
124
  "completedView.shippingMethod": "Shipping Method",
122
125
  "Contact Us": "Contact Us",
126
+ "contactPage.title": "Contact Us",
127
+ "contactPage.loadingText": "Sending",
128
+ "contactPage.titleText": "Contact Us",
129
+ "contactPage.infoText": "Drop us a line and we'll get back to you as soon as possible.",
130
+ "contactPage.telephone": "Phone Number",
131
+ "contactPage.telephonePlaceholder": "(222)-222-2222",
132
+ "contactPage.comment": "Message",
133
+ "contactPage.commentPlaceholder": "Tell us what's on your mind",
134
+ "contactPage.submit": "Send",
123
135
  "country.label": "Country",
124
136
  "couponCode.apply": "Apply",
125
137
  "couponCode.couponCode": "Coupon Code",
@@ -143,6 +155,8 @@
143
155
  "createWishlistForm.privateRadio": "Private",
144
156
  "createWishlistForm.publicRadio": "Public",
145
157
  "createWishlistForm.saveButton": "Save",
158
+ "customAttributes.title": "Details",
159
+ "Customer Service": "Customer Service",
146
160
  "customerForm.defaultShipping": "Make this my default address",
147
161
  "customerForm.formMessage": "The shipping address you enter will be saved to your address book and set as your default for future purchases.",
148
162
  "customerForm.loading": "Fetching Customer Details...",
@@ -211,6 +225,7 @@
211
225
  "global.deleteButton": "Delete",
212
226
  "global.editButton": "Edit",
213
227
  "global.email": "Email",
228
+ "global.emailPlaceholder": "abc@xyz.com",
214
229
  "global.firstName": "First Name",
215
230
  "global.free": "Free",
216
231
  "global.home": "Home",
@@ -234,7 +249,6 @@
234
249
  "guestForm.continueToNextStep": "Continue to Shipping Method",
235
250
  "guestForm.emailMessage": "Set a password at the end of guest checkout to create an account in one easy step.",
236
251
  "Help": "Help",
237
- "Live Chat": "Live Chat",
238
252
  "loadingIndicator.message": "Fetching Data...",
239
253
  "logo.title": "Venia",
240
254
  "magentoRoute.internalError": "Something went wrong. Sorry about that.",
@@ -251,6 +265,11 @@
251
265
  "navHeader.myAccountText": "My Account",
252
266
  "navHeader.signInText": "Sign In",
253
267
  "navigationTrigger.ariaLabel": "Toggle navigation panel",
268
+ "newsletter.subscribeMessage": "The email address is subscribed.",
269
+ "newsletter.loadingText": "Subscribing",
270
+ "newsletter.titleText": "Subscribe to Venia",
271
+ "newsletter.subscribeText": "Subscribe",
272
+ "newsletter.infoText": "Recieve the latest news, update and special offers right to your inbox.",
254
273
  "noProductsFound.noProductsFound": "Sorry! We couldn't find any products.",
255
274
  "noProductsFound.tryOneOfTheseCategories": "Try one of these categories",
256
275
  "Order Status": "Order Status",
@@ -393,6 +412,7 @@
393
412
  "sortItem.priceAsc": "Price: Low to High",
394
413
  "sortItem.priceDesc": "Price: High to Low",
395
414
  "sortItem.relevance": "Best Match",
415
+ "sortItem.position": "Position",
396
416
  "stockStatusMessage.message": "An item in your cart is currently out-of-stock and must be removed in order to Checkout.",
397
417
  "storedPayments.creditCard": "Credit Card",
398
418
  "storedPayments.delete": "Delete",
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import createTestInstance from '@magento/peregrine/lib/util/createTestInstance';
3
3
  import { useQuery } from '@apollo/client';
4
- import CategoryList from '../../../components/CategoryList';
5
4
  import RichContent from '../../../components/RichContent';
6
5
  import { StoreTitle } from '../../../components/Head';
7
6
  import CMSPage from '../cms';
@@ -20,7 +19,6 @@ jest.mock('../../../components/LoadingIndicator', () => {
20
19
  };
21
20
  });
22
21
  jest.mock('../../../components/RichContent', () => 'RichContent');
23
- jest.mock('../../../components/CategoryList', () => 'CategoryList');
24
22
 
25
23
  jest.mock('@magento/peregrine/lib/context/app', () => {
26
24
  const state = {
@@ -73,9 +71,6 @@ test('page is set to loading when checking the network for updates', () => {
73
71
  cmsPage: {
74
72
  url_key: 'cached_page',
75
73
  content: 'Cached Page.'
76
- },
77
- storeConfig: {
78
- root_category_id: 2
79
74
  }
80
75
  },
81
76
  error: false,
@@ -99,16 +94,14 @@ test('page is set to loading when checking the network for updates', () => {
99
94
  expect(mockSetPageLoading).toHaveBeenCalledWith(true);
100
95
  });
101
96
 
102
- test('render CategoryList when default content is present', () => {
97
+ test('renders default content', () => {
103
98
  useQuery.mockImplementation(() => {
104
99
  return {
105
100
  data: {
106
101
  cmsPage: {
102
+ title: 'Home Page',
107
103
  url_key: 'homepage',
108
104
  content: 'CMS homepage content goes here.'
109
- },
110
- storeConfig: {
111
- root_category_id: 2
112
105
  }
113
106
  },
114
107
  error: false,
@@ -117,13 +110,13 @@ test('render CategoryList when default content is present', () => {
117
110
  });
118
111
 
119
112
  const { root } = createTestInstance(<CMSPage {...props} />);
120
- const categoryList = root.findByType(CategoryList);
121
- expect(categoryList).toBeTruthy();
122
- expect(categoryList.props.title).toEqual('Shop by category');
123
- expect(categoryList.props.id).toEqual(2);
113
+ const pageTitle = root.findByType(StoreTitle).props.children;
114
+ const pageContent = root.findByType(RichContent).props.html;
115
+ expect(pageTitle).toEqual('Home Page');
116
+ expect(pageContent).toEqual('CMS homepage content goes here.');
124
117
  });
125
118
 
126
- test('render RichContent when default content is not present', () => {
119
+ test('render RichContent when content is present', () => {
127
120
  useQuery.mockImplementation(() => {
128
121
  return {
129
122
  data: {
@@ -132,9 +125,6 @@ test('render RichContent when default content is not present', () => {
132
125
  content_heading: 'This is a rich content heading',
133
126
  content:
134
127
  '<div class="richContent">This is rich content</div>'
135
- },
136
- storeConfig: {
137
- root_category_id: 2
138
128
  }
139
129
  },
140
130
  error: false,
@@ -152,6 +142,49 @@ test('render RichContent when default content is not present', () => {
152
142
  );
153
143
  });
154
144
 
145
+ test('do not render heading when empty', () => {
146
+ useQuery.mockImplementation(() => {
147
+ return {
148
+ data: {
149
+ cmsPage: {
150
+ url_key: 'homepage',
151
+ content_heading: '',
152
+ content:
153
+ '<div class="richContent">This is rich content</div>'
154
+ }
155
+ },
156
+ error: false,
157
+ loading: false
158
+ };
159
+ });
160
+
161
+ const { root } = createTestInstance(<CMSPage {...props} />);
162
+
163
+ expect(() => root.findByType('h1')).toThrow();
164
+ });
165
+
166
+ test('render root class with layout when defined', () => {
167
+ useQuery.mockImplementation(() => {
168
+ return {
169
+ data: {
170
+ cmsPage: {
171
+ url_key: 'homepage',
172
+ content_heading: 'This is a rich content heading',
173
+ content:
174
+ '<div class="richContent">This is rich content</div>',
175
+ page_layout: '1column'
176
+ }
177
+ },
178
+ error: false,
179
+ loading: false
180
+ };
181
+ });
182
+
183
+ const { root } = createTestInstance(<CMSPage {...props} />);
184
+
185
+ expect(root.findByProps({ className: 'root_1column' })).toBeTruthy();
186
+ });
187
+
155
188
  test('render meta information based on meta data from GraphQL', () => {
156
189
  useQuery.mockImplementation(() => {
157
190
  return {
@@ -162,9 +195,6 @@ test('render meta information based on meta data from GraphQL', () => {
162
195
  title: 'Test Title',
163
196
  meta_title: 'Test Meta Title',
164
197
  meta_description: 'Test Meta Description'
165
- },
166
- storeConfig: {
167
- root_category_id: 2
168
198
  }
169
199
  },
170
200
  error: false,
@@ -1,12 +1,12 @@
1
1
  import React, { Fragment } from 'react';
2
- import { number, shape, string } from 'prop-types';
2
+ import { shape, string } from 'prop-types';
3
+
3
4
  import { fullPageLoadingIndicator } from '../../components/LoadingIndicator';
4
5
  import { useCmsPage } from '@magento/peregrine/lib/talons/Cms/useCmsPage';
5
6
  import RichContent from '../../components/RichContent';
6
- import CategoryList from '../../components/CategoryList';
7
7
  import { Meta, StoreTitle } from '../../components/Head';
8
8
  import { useStyle } from '../../classify';
9
- import { useIntl } from 'react-intl';
9
+ import { toCamelCase } from '../../util/toCamelCase';
10
10
 
11
11
  import defaultClasses from './cms.module.css';
12
12
 
@@ -14,62 +14,58 @@ const CMSPage = props => {
14
14
  const { identifier } = props;
15
15
 
16
16
  const talonProps = useCmsPage({ identifier });
17
- const {
18
- cmsPage,
19
- hasContent,
20
- rootCategoryId,
21
- shouldShowLoadingIndicator
22
- } = talonProps;
23
- const { formatMessage } = useIntl();
17
+ const { cmsPage, shouldShowLoadingIndicator } = talonProps;
24
18
  const classes = useStyle(defaultClasses, props.classes);
25
19
 
26
20
  if (shouldShowLoadingIndicator) {
27
21
  return fullPageLoadingIndicator;
28
22
  }
29
23
 
30
- if (hasContent) {
31
- const {
32
- content_heading,
33
- title,
34
- meta_title,
35
- meta_description,
36
- content
37
- } = cmsPage;
24
+ const {
25
+ content_heading,
26
+ title,
27
+ meta_title,
28
+ meta_description,
29
+ page_layout,
30
+ content
31
+ } = cmsPage;
38
32
 
39
- const headingElement =
40
- content_heading !== '' ? (
41
- <h1 className={classes.heading}>{content_heading}</h1>
42
- ) : null;
33
+ const headingElement =
34
+ content_heading !== '' ? (
35
+ <h1 className={classes.heading}>{content_heading}</h1>
36
+ ) : null;
43
37
 
44
- const pageTitle = meta_title || title;
38
+ const pageTitle = meta_title || title;
39
+ const rootClassName = page_layout
40
+ ? classes[`root_${toCamelCase(page_layout)}`]
41
+ : classes.root;
45
42
 
46
- return (
47
- <Fragment>
48
- <StoreTitle>{pageTitle}</StoreTitle>
49
- <Meta name="title" content={pageTitle} />
50
- <Meta name="description" content={meta_description} />
43
+ return (
44
+ <Fragment>
45
+ <StoreTitle>{pageTitle}</StoreTitle>
46
+ <Meta name="title" content={pageTitle} />
47
+ <Meta name="description" content={meta_description} />
48
+ <article className={rootClassName}>
51
49
  {headingElement}
52
50
  <RichContent html={content} />
53
- </Fragment>
54
- );
55
- }
56
-
57
- // Fallback to a category list if there is no cms content.
58
- return (
59
- <CategoryList
60
- title={formatMessage({
61
- id: 'cms.shopByCategory',
62
- defaultMessage: 'Shop by category'
63
- })}
64
- id={rootCategoryId}
65
- />
51
+ </article>
52
+ </Fragment>
66
53
  );
67
54
  };
68
55
 
69
56
  CMSPage.propTypes = {
70
- id: number,
57
+ identifier: string,
71
58
  classes: shape({
72
- heading: string
59
+ root: string,
60
+ heading: string,
61
+ root_empty: string,
62
+ root_1column: string,
63
+ root_2columnsLeft: string,
64
+ root_2columnsRight: string,
65
+ root_3columns: string,
66
+ root_cmsFullWidth: string,
67
+ root_categoryFullWidth: string,
68
+ root_productFullWidth: string
73
69
  })
74
70
  };
75
71
 
@@ -1,22 +1,25 @@
1
1
  .root {
2
- padding: 1rem;
3
- }
4
-
5
- .title {
6
- font-size: 1.5rem;
7
- font-weight: 400;
8
- margin: 0 0 1rem;
9
- padding: 0.5rem;
2
+ composes: px-4 from global;
10
3
  }
11
4
 
12
5
  .heading {
13
- line-height: 1.25em;
14
- }
6
+ composes: mb-2 from global;
7
+ composes: mt-4 from global;
8
+ composes: text-center from global;
9
+ composes: text-3xl from global;
15
10
 
16
- .layout_default {
17
- padding: 0;
11
+ /* Medium */
12
+ composes: md_mb-10 from global;
13
+ composes: md_text-5xl from global;
18
14
  }
19
15
 
20
- .layout_1column {
21
- composes: layout_default;
16
+ .root_empty,
17
+ .root_1column,
18
+ .root_2columnsLeft,
19
+ .root_2columnsRight,
20
+ .root_3columns,
21
+ .root_cmsFullWidth,
22
+ .root_categoryFullWidth,
23
+ .root_productFullWidth {
24
+ composes: root;
22
25
  }
@@ -41,7 +41,7 @@ const NoProductsFound = props => {
41
41
  });
42
42
 
43
43
  return (
44
- <div className={classes.root}>
44
+ <div className={classes.root} data-cy="NoProductsFound-root">
45
45
  <Image
46
46
  alt={headerText}
47
47
  classes={{ image: classes.image, root: classes.imageContainer }}
@@ -4,7 +4,7 @@ exports[`Category Root Component error view does not render when data is present
4
4
  Array [
5
5
  "Meta",
6
6
  <CategoryContent
7
- categoryId={3}
7
+ categoryId="Mg=="
8
8
  classes={Object {}}
9
9
  data={
10
10
  Object {
@@ -93,7 +93,7 @@ exports[`Category Root Component renders the correct tree 1`] = `
93
93
  Array [
94
94
  "Meta",
95
95
  <CategoryContent
96
- categoryId={3}
96
+ categoryId="Mg=="
97
97
  classes={Object {}}
98
98
  data={
99
99
  Object {
@@ -41,6 +41,16 @@ Array [
41
41
  className="headerButtons"
42
42
  >
43
43
  <ProductSort
44
+ availableSortMethods={
45
+ Array [
46
+ Object {
47
+ "attribute": "sortItem.attribute",
48
+ "id": "sortItem.method",
49
+ "sortDirection": "ASC",
50
+ "text": "sortItem.text",
51
+ },
52
+ ]
53
+ }
44
54
  sortProps={
45
55
  Array [
46
56
  Object {
@@ -135,6 +145,16 @@ Array [
135
145
  }
136
146
  />
137
147
  <ProductSort
148
+ availableSortMethods={
149
+ Array [
150
+ Object {
151
+ "attribute": "sortItem.attribute",
152
+ "id": "sortItem.method",
153
+ "sortDirection": "ASC",
154
+ "text": "sortItem.text",
155
+ },
156
+ ]
157
+ }
138
158
  sortProps={
139
159
  Array [
140
160
  Object {
@@ -236,6 +256,16 @@ Array [
236
256
  }
237
257
  />
238
258
  <ProductSort
259
+ availableSortMethods={
260
+ Array [
261
+ Object {
262
+ "attribute": "sortItem.attribute",
263
+ "id": "sortItem.method",
264
+ "sortDirection": "ASC",
265
+ "text": "sortItem.text",
266
+ },
267
+ ]
268
+ }
239
269
  sortProps={
240
270
  Array [
241
271
  Object {
@@ -345,6 +375,16 @@ Array [
345
375
  }
346
376
  />
347
377
  <ProductSort
378
+ availableSortMethods={
379
+ Array [
380
+ Object {
381
+ "attribute": "sortItem.attribute",
382
+ "id": "sortItem.method",
383
+ "sortDirection": "ASC",
384
+ "text": "sortItem.text",
385
+ },
386
+ ]
387
+ }
348
388
  sortProps={
349
389
  Array [
350
390
  Object {
@@ -557,6 +597,16 @@ Array [
557
597
  className="headerButtons"
558
598
  >
559
599
  <ProductSort
600
+ availableSortMethods={
601
+ Array [
602
+ Object {
603
+ "attribute": "sortItem.attribute",
604
+ "id": "sortItem.method",
605
+ "sortDirection": "ASC",
606
+ "text": "sortItem.text",
607
+ },
608
+ ]
609
+ }
560
610
  sortProps={
561
611
  Array [
562
612
  Object {
@@ -694,6 +744,16 @@ Array [
694
744
  className="headerButtons"
695
745
  >
696
746
  <ProductSort
747
+ availableSortMethods={
748
+ Array [
749
+ Object {
750
+ "attribute": "sortItem.attribute",
751
+ "id": "sortItem.method",
752
+ "sortDirection": "ASC",
753
+ "text": "sortItem.text",
754
+ },
755
+ ]
756
+ }
697
757
  sortProps={
698
758
  Array [
699
759
  Object {
@@ -49,7 +49,7 @@ const talonProps = {
49
49
  };
50
50
 
51
51
  const categoryProps = {
52
- id: 3
52
+ uid: 'Mg=='
53
53
  };
54
54
 
55
55
  describe('Category Root Component', () => {
@@ -75,6 +75,14 @@ const defaultProps = {
75
75
  };
76
76
 
77
77
  const talonProps = {
78
+ availableSortMethods: [
79
+ {
80
+ id: 'sortItem.method',
81
+ text: 'sortItem.text',
82
+ attribute: 'sortItem.attribute',
83
+ sortDirection: 'ASC'
84
+ }
85
+ ],
78
86
  categoryName: 'Name',
79
87
  categoryDescription: 'test',
80
88
  filters: {},
@@ -2,8 +2,9 @@ import { gql } from '@apollo/client';
2
2
 
3
3
  export const GET_PAGE_SIZE = gql`
4
4
  query getPageSize {
5
+ # eslint-disable-next-line @graphql-eslint/require-id-when-available
5
6
  storeConfig {
6
- id
7
+ store_code
7
8
  grid_per_page
8
9
  }
9
10
  }
@@ -1,5 +1,5 @@
1
1
  import React, { Fragment } from 'react';
2
- import { number, shape, string } from 'prop-types';
2
+ import { shape, string } from 'prop-types';
3
3
  import { useCategory } from '@magento/peregrine/lib/talons/RootComponents/Category';
4
4
  import { useStyle } from '../../classify';
5
5
 
@@ -10,10 +10,10 @@ import { GET_PAGE_SIZE } from './category.gql';
10
10
  import ErrorView from '@magento/venia-ui/lib/components/ErrorView';
11
11
 
12
12
  const Category = props => {
13
- const { id } = props;
13
+ const { uid } = props;
14
14
 
15
15
  const talonProps = useCategory({
16
- id,
16
+ id: uid,
17
17
  queries: {
18
18
  getPageSize: GET_PAGE_SIZE
19
19
  }
@@ -45,7 +45,7 @@ const Category = props => {
45
45
  <Fragment>
46
46
  <Meta name="description" content={metaDescription} />
47
47
  <CategoryContent
48
- categoryId={id}
48
+ categoryId={uid}
49
49
  classes={classes}
50
50
  data={categoryData}
51
51
  isLoading={loading}
@@ -63,11 +63,11 @@ Category.propTypes = {
63
63
  root: string,
64
64
  title: string
65
65
  }),
66
- id: number
66
+ uid: string
67
67
  };
68
68
 
69
69
  Category.defaultProps = {
70
- id: 3
70
+ uid: 'Mg=='
71
71
  };
72
72
 
73
73
  export default Category;
@@ -46,6 +46,7 @@ const CategoryContent = props => {
46
46
  });
47
47
 
48
48
  const {
49
+ availableSortMethods,
49
50
  categoryName,
50
51
  categoryDescription,
51
52
  filters,
@@ -64,7 +65,7 @@ const CategoryContent = props => {
64
65
  const shouldShowFilterShimmer = filters === null;
65
66
 
66
67
  // If there are no products we can hide the sort button.
67
- const shouldShowSortButtons = totalPagesFromData;
68
+ const shouldShowSortButtons = totalPagesFromData && availableSortMethods;
68
69
  const shouldShowSortShimmer = !totalPagesFromData && isLoading;
69
70
 
70
71
  const maybeFilterButtons = shouldShowFilterButtons ? (
@@ -84,7 +85,10 @@ const CategoryContent = props => {
84
85
  ) : null;
85
86
 
86
87
  const maybeSortButton = shouldShowSortButtons ? (
87
- <ProductSort sortProps={sortProps} />
88
+ <ProductSort
89
+ sortProps={sortProps}
90
+ availableSortMethods={availableSortMethods}
91
+ />
88
92
  ) : shouldShowSortShimmer ? (
89
93
  <ProductSortShimmer />
90
94
  ) : null;
@@ -149,10 +153,13 @@ const CategoryContent = props => {
149
153
  <Fragment>
150
154
  <Breadcrumbs categoryId={categoryId} />
151
155
  <StoreTitle>{categoryName}</StoreTitle>
152
- <article className={classes.root}>
156
+ <article className={classes.root} data-cy="CategoryContent-root">
153
157
  <div className={classes.categoryHeader}>
154
158
  <h1 className={classes.title}>
155
- <div className={classes.categoryTitle}>
159
+ <div
160
+ className={classes.categoryTitle}
161
+ data-cy="CategoryContent-categoryTitle"
162
+ >
156
163
  {categoryTitle}
157
164
  </div>
158
165
  </h1>
@@ -8,7 +8,10 @@ import { useStyle } from '../../classify';
8
8
  import defaultClasses from './section.module.css';
9
9
 
10
10
  const Section = props => {
11
- const { children, id, title } = props;
11
+ const { children, id, title, ...restProps } = props;
12
+
13
+ // Remove isOpen from restProps to avoid having it in the root container
14
+ delete restProps.isOpen;
12
15
 
13
16
  const { handleSectionToggle, openSectionIds } = useAccordionContext();
14
17
 
@@ -27,9 +30,10 @@ const Section = props => {
27
30
  : classes.contents_container_closed;
28
31
 
29
32
  return (
30
- <div className={classes.root}>
33
+ <div className={classes.root} {...restProps}>
31
34
  <button
32
35
  className={classes.title_container}
36
+ data-cy="Section-titleContainer"
33
37
  onClick={handleSectionToggleWithId}
34
38
  type="button"
35
39
  >
@@ -2,8 +2,8 @@ import { gql } from '@apollo/client';
2
2
 
3
3
  export const GET_CUSTOMER_DETAILS = gql`
4
4
  query accountChipQuery {
5
+ # eslint-disable-next-line @graphql-eslint/require-id-when-available
5
6
  customer {
6
- id
7
7
  firstname
8
8
  }
9
9
  }