@jetshop/template-trend 5.9.0 → 5.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/.linaria-cache/packages/template-trend/src/components/Auth/LogInPage.linaria.css +4 -4
  2. package/.linaria-cache/packages/template-trend/src/components/Auth/Signup/Address.linaria.css +1 -1
  3. package/.linaria-cache/packages/template-trend/src/components/Auth/Signup/CustomerType.linaria.css +1 -1
  4. package/.linaria-cache/packages/template-trend/src/components/Auth/Signup/LoginFields.linaria.css +1 -1
  5. package/.linaria-cache/packages/template-trend/src/components/Auth/Signup/SignUpPage.linaria.css +2 -2
  6. package/.linaria-cache/packages/template-trend/src/components/Auth/UI/Form.linaria.css +2 -2
  7. package/.linaria-cache/packages/template-trend/src/components/Cart/CartButton.linaria.css +2 -2
  8. package/.linaria-cache/packages/template-trend/src/components/Cart/CartFlyout.linaria.css +7 -7
  9. package/.linaria-cache/packages/template-trend/src/components/Cart/CartItem.linaria.css +7 -7
  10. package/.linaria-cache/packages/template-trend/src/components/Cart/FreeShipping.linaria.css +2 -2
  11. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/CategoryHeader.linaria.css +8 -8
  12. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/ActiveFilters.linaria.css +6 -6
  13. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/Filter.linaria.css +4 -4
  14. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/FilterDrawer.linaria.css +4 -4
  15. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/FilterDropdownMenu.linaria.css +1 -1
  16. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/Mobile/ActiveCarot.linaria.css +1 -1
  17. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/Mobile/FilterButton.linaria.css +5 -5
  18. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/Mobile/ListAccordion.linaria.css +1 -1
  19. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/Mobile/shared/styles.linaria.css +1 -1
  20. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/RangeFilters.linaria.css +2 -2
  21. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/ProductCard.linaria.css +1 -1
  22. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/ProductGrid.linaria.css +2 -2
  23. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/ProductGridWindow.linaria.css +2 -2
  24. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/StandardCategoryPage.linaria.css +2 -2
  25. package/.linaria-cache/packages/template-trend/src/components/CategoryPage/WindowedCategoryPage.linaria.css +3 -3
  26. package/.linaria-cache/packages/template-trend/src/components/ContentPage/ContentPage.linaria.css +3 -3
  27. package/.linaria-cache/packages/template-trend/src/components/CookieConsent.linaria.css +1 -1
  28. package/.linaria-cache/packages/template-trend/src/components/Forms/GlobalError.linaria.css +1 -1
  29. package/.linaria-cache/packages/template-trend/src/components/Forms/Input.linaria.css +4 -4
  30. package/.linaria-cache/packages/template-trend/src/components/Forms/InputStatus.linaria.css +3 -3
  31. package/.linaria-cache/packages/template-trend/src/components/Forms/Success.linaria.css +1 -1
  32. package/.linaria-cache/packages/template-trend/src/components/Layout/Container.linaria.css +1 -1
  33. package/.linaria-cache/packages/template-trend/src/components/Layout/Content/index.linaria.css +1 -1
  34. package/.linaria-cache/packages/template-trend/src/components/Layout/Footer/Footer.linaria.css +3 -3
  35. package/.linaria-cache/packages/template-trend/src/components/Layout/Footer/SocialLinks.linaria.css +2 -2
  36. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/Categories/MobileCategories.linaria.css +6 -6
  37. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/CategoryMenu/CategoryMenu.linaria.css +1 -1
  38. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/CategoryMenu/CategoryMenuContainer.linaria.css +2 -2
  39. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/CategoryMenu/SubMenuSection.linaria.css +1 -1
  40. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/CategoryMenu/SubMenuWrapper.linaria.css +5 -5
  41. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/ChannelSelector/ChannelSelector.linaria.css +2 -2
  42. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/ChannelSelector/ChannelSelectorModal.linaria.css +2 -2
  43. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/ChannelSelector/Selector.linaria.css +5 -5
  44. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/Header.linaria.css +7 -7
  45. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/Logo.linaria.css +1 -1
  46. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/LogoSearchBar.linaria.css +1 -1
  47. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/MobileMenu.linaria.css +6 -6
  48. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/RecommendedChannel/ChannelBanner.linaria.css +5 -5
  49. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/RecommendedChannel/RecommendedChannelSelector.linaria.css +9 -9
  50. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/SearchBar.linaria.css +3 -3
  51. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/SearchButton.linaria.css +1 -1
  52. package/.linaria-cache/packages/template-trend/src/components/Layout/Header/TopNav.linaria.css +1 -1
  53. package/.linaria-cache/packages/template-trend/src/components/Layout/MaxWidth.linaria.css +1 -1
  54. package/.linaria-cache/packages/template-trend/src/components/Layout/Notifications.linaria.css +1 -1
  55. package/.linaria-cache/packages/template-trend/src/components/LoadingPage.linaria.css +1 -1
  56. package/.linaria-cache/packages/template-trend/src/components/MyPages/CustomerNameHeader.linaria.css +1 -1
  57. package/.linaria-cache/packages/template-trend/src/components/MyPages/DeleteAccount.linaria.css +1 -1
  58. package/.linaria-cache/packages/template-trend/src/components/MyPages/MyPages.linaria.css +1 -1
  59. package/.linaria-cache/packages/template-trend/src/components/MyPages/MyPagesSidebar.linaria.css +1 -1
  60. package/.linaria-cache/packages/template-trend/src/components/MyPages/MyPagesStartPage.linaria.css +2 -2
  61. package/.linaria-cache/packages/template-trend/src/components/MyPages/Orders/ListOrder.linaria.css +1 -1
  62. package/.linaria-cache/packages/template-trend/src/components/MyPages/Orders/OrderDetail/ListDetail.linaria.css +4 -4
  63. package/.linaria-cache/packages/template-trend/src/components/MyPages/Orders/OrderDetail/OrderTotals.linaria.css +1 -1
  64. package/.linaria-cache/packages/template-trend/src/components/MyPages/Orders/OrderDetail/ShippingPayment.linaria.css +1 -1
  65. package/.linaria-cache/packages/template-trend/src/components/MyPages/Orders/OrderListPage.linaria.css +1 -1
  66. package/.linaria-cache/packages/template-trend/src/components/MyPages/ProfileDeliveryAddresses.linaria.css +1 -1
  67. package/.linaria-cache/packages/template-trend/src/components/MyPages/ProfilePage.linaria.css +4 -4
  68. package/.linaria-cache/packages/template-trend/src/components/NavigationTree/NavTree.linaria.css +2 -2
  69. package/.linaria-cache/packages/template-trend/src/components/Newsletter/NewsletterField.linaria.css +3 -3
  70. package/.linaria-cache/packages/template-trend/src/components/NotFoundPage.linaria.css +1 -1
  71. package/.linaria-cache/packages/template-trend/src/components/Pagination/Pagination.linaria.css +1 -1
  72. package/.linaria-cache/packages/template-trend/src/components/ProductList/AddToCart.linaria.css +1 -1
  73. package/.linaria-cache/packages/template-trend/src/components/ProductList/Favourite.linaria.css +1 -1
  74. package/.linaria-cache/packages/template-trend/src/components/ProductList/Favourites.linaria.css +2 -2
  75. package/.linaria-cache/packages/template-trend/src/components/ProductList/Product.linaria.css +2 -2
  76. package/.linaria-cache/packages/template-trend/src/components/ProductPage/AddToCart/AddToCartForm.linaria.css +3 -3
  77. package/.linaria-cache/packages/template-trend/src/components/ProductPage/AddToCart/ProductToast.linaria.css +9 -9
  78. package/.linaria-cache/packages/template-trend/src/components/ProductPage/Campaigns.linaria.css +2 -2
  79. package/.linaria-cache/packages/template-trend/src/components/ProductPage/ConfigurationSelector.linaria.css +1 -1
  80. package/.linaria-cache/packages/template-trend/src/components/ProductPage/Images/ImageContainer.linaria.css +1 -1
  81. package/.linaria-cache/packages/template-trend/src/components/ProductPage/PackageProduct/IncludedInPackages.linaria.css +1 -1
  82. package/.linaria-cache/packages/template-trend/src/components/ProductPage/PackageProduct/PackageProduct.linaria.css +2 -2
  83. package/.linaria-cache/packages/template-trend/src/components/ProductPage/PackageProduct/PackageProductItem.linaria.css +1 -1
  84. package/.linaria-cache/packages/template-trend/src/components/ProductPage/ProductInfo.linaria.css +3 -3
  85. package/.linaria-cache/packages/template-trend/src/components/ProductPage/ProductInfoAccordion.linaria.css +3 -3
  86. package/.linaria-cache/packages/template-trend/src/components/ProductPage/ProductPage.linaria.css +1 -1
  87. package/.linaria-cache/packages/template-trend/src/components/ProductPage/ProductPageLoadingState.linaria.css +3 -3
  88. package/.linaria-cache/packages/template-trend/src/components/ProductPage/RelatedProducts.linaria.css +1 -1
  89. package/.linaria-cache/packages/template-trend/src/components/ProductPage/StockStatus/NotifyWhenBack.linaria.css +5 -5
  90. package/.linaria-cache/packages/template-trend/src/components/ProductPage/StockStatus/StockOrb.linaria.css +1 -1
  91. package/.linaria-cache/packages/template-trend/src/components/ProductPage/StockStatus/StockStatusIndicator.linaria.css +1 -1
  92. package/.linaria-cache/packages/template-trend/src/components/ProductPage/StockStatus/WarehouseStock.linaria.css +2 -2
  93. package/.linaria-cache/packages/template-trend/src/components/ProductPage/VariantSelector.linaria.css +3 -3
  94. package/.linaria-cache/packages/template-trend/src/components/ProductPage/styledComponents.linaria.css +1 -1
  95. package/.linaria-cache/packages/template-trend/src/components/SearchPage/CategoryList.linaria.css +7 -0
  96. package/.linaria-cache/packages/template-trend/src/components/SearchPage/SearchMeta.linaria.css +1 -1
  97. package/.linaria-cache/packages/template-trend/src/components/SearchPage/SearchPage.linaria.css +3 -3
  98. package/.linaria-cache/packages/template-trend/src/components/SearchPage/SearchResults.linaria.css +3 -3
  99. package/.linaria-cache/packages/template-trend/src/components/SearchPage/SearchTerm.linaria.css +1 -1
  100. package/.linaria-cache/packages/template-trend/src/components/SearchPage/WindowedSearchResults.linaria.css +4 -4
  101. package/.linaria-cache/packages/template-trend/src/components/StartPage/CategoryList.linaria.css +6 -6
  102. package/.linaria-cache/packages/template-trend/src/components/StartPage/Content/Row.linaria.css +3 -3
  103. package/.linaria-cache/packages/template-trend/src/components/StartPage/Content/StartPageCampaign.linaria.css +7 -7
  104. package/.linaria-cache/packages/template-trend/src/components/StartPage/Content/StartPageCategories.linaria.css +3 -3
  105. package/.linaria-cache/packages/template-trend/src/components/StartPage/Content/StartPageHTMLContent.linaria.css +1 -1
  106. package/.linaria-cache/packages/template-trend/src/components/StartPage/Content/StartPageHero.linaria.css +6 -6
  107. package/.linaria-cache/packages/template-trend/src/components/StartPage/Content/StartPageProductGrid.linaria.css +2 -2
  108. package/.linaria-cache/packages/template-trend/src/components/StartPage/StartPage.linaria.css +1 -2
  109. package/.linaria-cache/packages/template-trend/src/components/Store/Store.linaria.css +1 -1
  110. package/.linaria-cache/packages/template-trend/src/components/StoreLocator/StoreList.linaria.css +5 -5
  111. package/.linaria-cache/packages/template-trend/src/components/StoreLocator/StoreLocator.linaria.css +5 -5
  112. package/.linaria-cache/packages/template-trend/src/components/StoreLocator/StoreMap.linaria.css +1 -1
  113. package/.linaria-cache/packages/template-trend/src/components/StoreLocator/StoreMarker.linaria.css +1 -1
  114. package/.linaria-cache/packages/template-trend/src/components/StoreLocator/StoreSearch.linaria.css +1 -1
  115. package/.linaria-cache/packages/template-trend/src/components/StoreLocator/UserLocation.linaria.css +1 -1
  116. package/.linaria-cache/packages/template-trend/src/components/ui/Badge.linaria.css +1 -1
  117. package/.linaria-cache/packages/template-trend/src/components/ui/Button.linaria.css +4 -3
  118. package/.linaria-cache/packages/template-trend/src/components/ui/CloseButton.linaria.css +1 -1
  119. package/.linaria-cache/packages/template-trend/src/components/ui/Headings.linaria.css +2 -2
  120. package/.linaria-cache/packages/template-trend/src/components/ui/Spinner.linaria.css +1 -1
  121. package/.linaria-cache/packages/ui/Breadcrumbs/Breadcrumbs.linaria.css +2 -2
  122. package/.linaria-cache/packages/ui/Button/Button.linaria.css +2 -2
  123. package/.linaria-cache/packages/ui/Button/SecondaryButton.linaria.css +1 -1
  124. package/.linaria-cache/packages/ui/Button/TrendButton.linaria.css +1 -1
  125. package/.linaria-cache/packages/ui/ChannelSelector/ChannelSelector.linaria.css +1 -1
  126. package/.linaria-cache/packages/ui/ChannelSelector/ChannelSelectorButtons.linaria.css +2 -2
  127. package/.linaria-cache/packages/ui/ChannelSelector/LargeSelector.linaria.css +1 -1
  128. package/.linaria-cache/packages/ui/ChannelSelector/MiniSelector.linaria.css +1 -1
  129. package/.linaria-cache/packages/ui/Checkbox/Checkbox.linaria.css +4 -4
  130. package/.linaria-cache/packages/ui/Checkbox/CheckboxGroup.linaria.css +2 -2
  131. package/.linaria-cache/packages/ui/DropdownMenu/DropdownMenu.linaria.css +2 -2
  132. package/.linaria-cache/packages/ui/ErrorBoundary/Generic.linaria.css +1 -1
  133. package/.linaria-cache/packages/ui/Gallery/Gallery.linaria.css +2 -2
  134. package/.linaria-cache/packages/ui/JetshopText.linaria.css +1 -1
  135. package/.linaria-cache/packages/ui/Loading/LoadingBar.linaria.css +2 -2
  136. package/.linaria-cache/packages/ui/Modal/Drawer/Drawer.linaria.css +1 -1
  137. package/.linaria-cache/packages/ui/Modal/ModalRoot.linaria.css +1 -1
  138. package/.linaria-cache/packages/ui/Modal/TargetWrapper.linaria.css +1 -1
  139. package/.linaria-cache/packages/ui/Pagination/Pagination.linaria.css +1 -1
  140. package/.linaria-cache/packages/ui/PreOrderDateSelector/PreOrderDateSelector.linaria.css +1 -1
  141. package/.linaria-cache/packages/ui/Price/Price.linaria.css +1 -1
  142. package/.linaria-cache/packages/ui/ProductList/Badges.linaria.css +7 -7
  143. package/.linaria-cache/packages/ui/ProductSpecifications/ProductSpecifications.linaria.css +1 -1
  144. package/.linaria-cache/packages/ui/Search/SearchField.linaria.css +5 -5
  145. package/.linaria-cache/packages/ui/Search/SearchPage/SearchMeta.linaria.css +1 -1
  146. package/.linaria-cache/packages/ui/Select/Components.linaria.css +8 -8
  147. package/.vscode/launch.json +11 -0
  148. package/README.md +118 -1944
  149. package/cypress/integration/essentials.spec.js +50 -0
  150. package/package.json +5 -5
  151. package/schema.graphql +1 -0
  152. package/src/components/Auth/ForgotPassword.js +3 -8
  153. package/src/components/Auth/README.md +5 -0
  154. package/src/components/Cart/CartButton.js +40 -44
  155. package/src/components/Cart/CartFlyout.js +8 -5
  156. package/src/components/Cart/CartItem.js +12 -15
  157. package/src/components/Cart/{addMultipleToCart.gql → queries/addMultipleToCart.gql} +1 -1
  158. package/src/components/Cart/{addToCart.gql → queries/addToCart.gql} +1 -1
  159. package/src/components/Cart/{CartFragment.gql → queries/cartFragment.gql} +2 -5
  160. package/src/components/Cart/{CartQuery.gql → queries/cartQuery.gql} +1 -1
  161. package/src/components/Cart/{decrementQuantity.gql → queries/decrementQuantity.gql} +1 -1
  162. package/src/components/Cart/{incrementQuantity.gql → queries/incrementQuantity.gql} +1 -1
  163. package/src/components/Cart/{removeFromCart.gql → queries/removeFromCart.gql} +1 -1
  164. package/src/components/CategoryPage/CategoryHeader.js +3 -3
  165. package/src/components/CategoryPage/CategoryPage.js +1 -0
  166. package/src/components/CategoryPage/Filters/ListFilters.js +1 -2
  167. package/src/components/CategoryPage/ProductCard.js +3 -1
  168. package/src/components/CategoryPage/ProductGrid.js +8 -2
  169. package/src/components/CategoryPage/ProductGridWindow.js +22 -14
  170. package/src/components/CategoryPage/README.md +11 -0
  171. package/src/components/CategoryPage/StandardCategoryPage.js +2 -0
  172. package/src/components/CategoryPage/WindowedCategoryPage.js +13 -5
  173. package/src/components/Forms/Input.js +3 -6
  174. package/src/components/Layout/Header/AutocompleteQuery.gql +1 -6
  175. package/src/components/Layout/Header/ChannelSelector/ChannelSelector.js +3 -0
  176. package/src/components/Layout/Header/ChannelSelector/ChannelSelectorModal.js +4 -3
  177. package/src/components/Layout/Header/ChannelSelector/Selector.js +2 -0
  178. package/src/components/Layout/Header/RecommendedChannel/RecommendedChannelSelector.js +3 -1
  179. package/src/components/Layout/Header/TopNav.js +13 -11
  180. package/src/components/LogOut.loadable.js +10 -0
  181. package/src/components/MyPages/MyPagesSidebar.js +0 -1
  182. package/src/components/PreviewRoute.loadable.js +10 -0
  183. package/src/components/ProductList/AddToCart.js +8 -5
  184. package/src/components/ProductList/Favourite.js +2 -2
  185. package/src/components/ProductList/FavouriteCount.js +2 -2
  186. package/src/components/ProductList/Favourites.js +17 -12
  187. package/src/components/ProductList/Lister.js +44 -0
  188. package/src/components/ProductList/Product.js +5 -4
  189. package/src/components/ProductList/ProductLists.gql +8 -5
  190. package/src/components/ProductList/SelectVariant.js +6 -10
  191. package/src/components/ProductList/productListQueries.js +5 -0
  192. package/src/components/ProductPage/AddToCart/AddToCartForm.js +19 -18
  193. package/src/components/ProductPage/AddToCart/ProductToast.js +7 -4
  194. package/src/components/ProductPage/Images/ImageContainer.js +12 -1
  195. package/src/components/ProductPage/PackageProduct/PackageProduct.js +8 -6
  196. package/src/components/ProductPage/ProductInfo.js +1 -1
  197. package/src/components/ProductPage/ProductPage.js +3 -5
  198. package/src/components/ProductPage/ProductPageFragment.gql +1 -0
  199. package/src/components/ProductPage/StockStatus/WarehouseStock.js +15 -17
  200. package/src/components/ProductPage/VariantSelector.js +1 -1
  201. package/src/components/RouteQuery.gql +2 -2
  202. package/src/components/{StartPage → SearchPage}/CategoryList.js +6 -4
  203. package/src/components/SearchPage/EmptySearchResults.js +1 -1
  204. package/src/components/Shop.js +52 -76
  205. package/src/components/StartPage/Content/Row.js +0 -37
  206. package/src/components/StartPage/Content/StartPageHero.js +9 -1
  207. package/src/components/StartPage/StartPage.js +0 -13
  208. package/src/components/StartPage/StartPageProductGridFragment.gql +1 -0
  209. package/src/components/ui/Button.js +19 -1
  210. package/.linaria-cache/packages/ui/ChannelSelector/Region.linaria.css +0 -3
  211. package/cypress/constants.js +0 -5
  212. package/cypress/integration/addToCart/addToCart.spec.js +0 -27
  213. package/cypress/integration/addToCart/disabledVariations.spec.js +0 -17
  214. package/cypress/integration/addToCart/newslettersubscriber.spec.js +0 -24
  215. package/cypress/integration/addToCart/notifyWhenBackInStock.spec.js +0 -20
  216. package/cypress/integration/addToCart/productConfigurations.spec.js +0 -35
  217. package/cypress/integration/addToCart/productVariations.spec.js +0 -42
  218. package/cypress/integration/addToCart/sizePriceChange.spec.js +0 -20
  219. package/cypress/integration/analytics/gtag.spec.js +0 -87
  220. package/cypress/integration/analytics/releware.spec.js +0 -95
  221. package/cypress/integration/auth/login.spec.js +0 -18
  222. package/cypress/integration/auth/signup.spec.js +0 -98
  223. package/cypress/integration/category_page_spec.js +0 -73
  224. package/cypress/integration/filters.spec.js +0 -103
  225. package/cypress/integration/getbyarticlenumber.spec.js +0 -28
  226. package/cypress/integration/packages.spec.js +0 -85
  227. package/cypress/integration/prefetch_headers_spec.js +0 -26
  228. package/cypress/integration/product_browsing_spec.js +0 -17
  229. package/cypress/integration/search/autocomplete.spec.js +0 -28
  230. package/cypress/integration/search/search_page.spec.js +0 -39
  231. package/cypress/integration/ssr/categorySSR.js +0 -9
  232. package/cypress/integration/ssr/productSSR.js +0 -9
  233. package/cypress/integration/ssr/startPageSSR.js +0 -5
  234. package/cypress/integration/start_page_spec.js +0 -5
  235. package/cypress/integration/stores_page.spec.js +0 -5
  236. package/src/components/StartPage/Campaign.js +0 -162
  237. package/src/components/StartPage/CampaignHeader.js +0 -101
  238. package/src/components/StartPage/ExtraDetails.js +0 -72
  239. package/src/components/StartPage/Readme.md +0 -88
  240. package/src/components/StartPage/campaign.json +0 -20
  241. package/src/components/StartPage/campaignHeader.json +0 -5
  242. package/src/components/StartPage/categoryList.json +0 -65
  243. package/src/components/StartPage/extraDetails.json +0 -6
  244. package/src/components/StartPage/title.json +0 -3
@@ -207,21 +207,19 @@ const WarehouseStock = ({ product, variantHandler }) => {
207
207
 
208
208
  const WarehouseStockItem = ({ item, missingOptions, validation }) => {
209
209
  return (
210
- <>
211
- <WarehouseStockWrapper className="warehouse-stock-wrapper">
212
- <p className="stock-status-header">
213
- <span className="store-icon">
214
- <StoreIcon />
215
- </span>
216
- <span className="header-title">{t('Find product in store')}</span>
217
- </p>
218
- <WarehouseValidation
219
- validation={validation}
220
- missingOptions={missingOptions}
221
- item={item}
222
- ></WarehouseValidation>
223
- </WarehouseStockWrapper>
224
- </>
210
+ <WarehouseStockWrapper className="warehouse-stock-wrapper">
211
+ <p className="stock-status-header">
212
+ <span className="store-icon">
213
+ <StoreIcon />
214
+ </span>
215
+ <span className="header-title">{t('Find product in store')}</span>
216
+ </p>
217
+ <WarehouseValidation
218
+ validation={validation}
219
+ missingOptions={missingOptions}
220
+ item={item}
221
+ />
222
+ </WarehouseStockWrapper>
225
223
  );
226
224
  };
227
225
 
@@ -257,7 +255,7 @@ function WarehouseValidation({ validation, missingOptions, item }) {
257
255
  <WarehouseStockItemContent
258
256
  warehouse={warehouse}
259
257
  productVariant={productVariant}
260
- key-={warehouse.location?.id}
258
+ key={warehouse.location?.id}
261
259
  />
262
260
  ))}
263
261
  </ul>
@@ -295,7 +293,7 @@ const WarehouseStockItemContent = ({ warehouse, productVariant }) => {
295
293
  }
296
294
 
297
295
  return (
298
- <li key={warehouse.location?.id} className="warehouse-list-item">
296
+ <li className="warehouse-list-item">
299
297
  <div className="warehouse-name">
300
298
  <span>{warehouse.location?.name}</span>
301
299
  </div>
@@ -159,7 +159,7 @@ function DropdownVariantSelect({
159
159
  <DropdownMenuItem
160
160
  data-testid={value + option.name}
161
161
  key={value + option.name}
162
- disabled={doNotDisable && validation === 'invalid'}
162
+ disabled={!doNotDisable && validation === 'invalid'}
163
163
  onSelect={({ setIsOpen }) => {
164
164
  selectValue(value, option);
165
165
  setIsOpen(false);
@@ -1,4 +1,4 @@
1
- #import "@jetshop/core/data/fragments/RouteCrumbFragment.gql"
1
+ #import "@jetshop/core/data/fragments/RouteMetaFragment.gql"
2
2
  #import "@jetshop/core/data/fragments/HeadFragment.gql"
3
3
  #import "./CategoryPage/CategoryPageFragment.gql"
4
4
  #import "./ContentPage/ContentPageFragment.gql"
@@ -12,7 +12,7 @@ query route(
12
12
  $filters: FilterInput
13
13
  ) {
14
14
  route(path: $path) {
15
- ...RouteCrumb
15
+ ...RouteMeta
16
16
  object {
17
17
  ...Head
18
18
  ...CategoryPage
@@ -3,7 +3,7 @@ import { styled } from 'linaria/react';
3
3
  import CategoryLink from '@jetshop/ui/CategoryLink';
4
4
  import Image from '@jetshop/ui/Image';
5
5
  import { theme } from '../Theme';
6
- import { MainSectionWrapper } from './StartPage';
6
+ import MaxWidth from '../Layout/MaxWidth';
7
7
 
8
8
  const ScrollWrapper = styled('div')`
9
9
  margin: 0 -1.5rem;
@@ -112,7 +112,9 @@ const CategoriesHeader = styled('h3')`
112
112
  }
113
113
  `;
114
114
 
115
- const CategoryListWrapper = styled('div')``;
115
+ const CategoryListWrapper = styled('div')`
116
+ padding: 1rem 0;
117
+ `;
116
118
 
117
119
  const Category = ({ category }) => {
118
120
  const categoryImageUrl = category?.images?.[0]?.url;
@@ -135,7 +137,7 @@ const Category = ({ category }) => {
135
137
  };
136
138
  const CategoryList = ({ title, categories, className = '' }) => {
137
139
  return (
138
- <MainSectionWrapper className={className}>
140
+ <MaxWidth className={className}>
139
141
  <CategoryListWrapper>
140
142
  <CategoriesHeader>{title}</CategoriesHeader>
141
143
  <ScrollWrapper>
@@ -146,7 +148,7 @@ const CategoryList = ({ title, categories, className = '' }) => {
146
148
  </CategoriesWrapper>
147
149
  </ScrollWrapper>
148
150
  </CategoryListWrapper>
149
- </MainSectionWrapper>
151
+ </MaxWidth>
150
152
  );
151
153
  };
152
154
 
@@ -1,7 +1,7 @@
1
1
  import t from '@jetshop/intl';
2
2
  import React from 'react';
3
3
  import { Query } from 'react-apollo';
4
- import CategoryList from '../StartPage/CategoryList';
4
+ import CategoryList from './CategoryList';
5
5
  import { Header, Matches } from './SearchPage';
6
6
  import SearchTerm from './SearchTerm';
7
7
  import EmptySearchCategoriesQuery from './EmptySearchCategoriesQuery.gql';
@@ -1,60 +1,53 @@
1
- import DynamicRoute from '@jetshop/core/components/DynamicRoute';
1
+ import React from 'react';
2
+ import { Helmet } from 'react-helmet-async';
3
+ import { Route, Switch } from 'react-router-dom';
4
+
2
5
  import CustomFont from '@jetshop/core/components/Fonts/CustomFont';
6
+ import DynamicRoute from '@jetshop/core/components/DynamicRoute';
3
7
  import PaginationProvider from '@jetshop/core/components/Pagination/PaginationProvider';
4
8
  import { ProductListProvider } from '@jetshop/core/hooks/ProductList/ProductListContext';
5
9
  import { useShopConfig } from '@jetshop/core/hooks/useShopConfig';
10
+
6
11
  import GenericError from '@jetshop/ui/ErrorBoundary/Generic';
7
12
  import LoadingBar from '@jetshop/ui/Loading/LoadingBar';
8
13
  import ModalProvider from '@jetshop/ui/Modal/ModalProvider';
9
14
  import ModalRoot from '@jetshop/ui/Modal/ModalRoot';
10
15
  import ScrollRestorationHandler from '@jetshop/ui/ScrollRestorationHandler';
11
- import React from 'react';
12
- import { Helmet } from 'react-helmet-async';
13
- import loadable from '@loadable/component';
14
- import { Route, Switch } from 'react-router-dom';
15
- import loadFontCss from '../fonts/loadFontCss';
16
- import CategoryPreviewQuery from './CategoryPreviewQuery.gql';
17
- import PagePreviewQuery from './PagePreviewQuery.gql';
16
+
18
17
  import Container from './Layout/Container';
19
18
  import Content from './Layout/Content';
20
19
  import Footer from './Layout/Footer/Footer';
21
20
  import Header from './Layout/Header/Header';
21
+
22
+ import ForgotPassword from './Auth/ForgotPassword.loadable';
23
+ import LogInPage from './Auth/LogInPage.loadable';
24
+ import ResetPassword from './Auth/ResetPassword.loadable';
25
+ import SignUpPage from './Auth/Signup/SignUpPage.loadable';
26
+ import CategoryPage from './CategoryPage/CategoryPage.loadable';
27
+ import ContentPage from './ContentPage/ContentPage.loadable';
28
+ import CookieConsent from './CookieConsent';
22
29
  import LoadingPage from './LoadingPage';
30
+ import LogOutPage from './LogOut.loadable';
31
+ import MyPages from './MyPages/MyPages.loadable';
32
+ import NavTreePage from './NavigationTree/NavTreePage.loadable';
33
+ import NotFoundPage from './NotFoundPage.loadable';
34
+ import PreviewRoute from './PreviewRoute.loadable';
23
35
  import { Favourites } from './ProductList/Favourites';
24
36
  import { productListQueries } from './ProductList/productListQueries';
25
- import ProductPreviewQuery from './ProductPreviewQuery.gql';
26
- import routeQuery from './RouteQuery.gql';
27
- import { theme } from './Theme';
28
- import '../globalStyles';
29
- import CookieConsent from './CookieConsent';
30
- import Store from './Store/Store.loadable';
31
- import StoreLocator from './StoreLocator/StoreLocator.loadable';
32
- import NotFoundPage from './NotFoundPage.loadable';
33
- import LogInPage from './Auth/LogInPage.loadable';
34
- import NavTreePage from './NavigationTree/NavTreePage.loadable';
35
- import StartPage from './StartPage/StartPage.loadable';
36
37
  import ProductPage from './ProductPage/ProductPage.loadable';
37
- import CategoryPage from './CategoryPage/CategoryPage.loadable';
38
- import ContentPage from './ContentPage/ContentPage.loadable';
39
38
  import SearchPage from './SearchPage/SearchPage.loadable';
40
- import SignUpPage from './Auth/Signup/SignUpPage.loadable';
41
- import ForgotPassword from './Auth/ForgotPassword.loadable';
42
- import ResetPassword from './Auth/ResetPassword.loadable';
43
- import MyPages from './MyPages/MyPages.loadable';
39
+ import StartPage from './StartPage/StartPage.loadable';
40
+ import Store from './Store/Store.loadable';
41
+ import StoreLocator from './StoreLocator/StoreLocator.loadable';
44
42
 
45
- const LogOutPage = loadable(
46
- () => import('@jetshop/core/components/AuthContext/LogOut'),
47
- {
48
- fallback: <LoadingPage />
49
- }
50
- );
43
+ import categoryPreviewQuery from './CategoryPreviewQuery.gql';
44
+ import pagePreviewQuery from './PagePreviewQuery.gql';
45
+ import productPreviewQuery from './ProductPreviewQuery.gql';
46
+ import routeQuery from './RouteQuery.gql';
51
47
 
52
- const PreviewRoute = loadable(
53
- () => import('@jetshop/core/components/DynamicRoute/PreviewRoute'),
54
- {
55
- fallback: <LoadingPage />
56
- }
57
- );
48
+ import { theme } from './Theme';
49
+ import loadFontCss from '../fonts/loadFontCss';
50
+ import '../globalStyles';
58
51
 
59
52
  function Shop() {
60
53
  const { routes } = useShopConfig();
@@ -76,49 +69,32 @@ function Shop() {
76
69
  <Content>
77
70
  <PaginationProvider defaultProductsPerPage={24}>
78
71
  <Switch>
79
- <Route exact path="/">
80
- <StartPage />
81
- </Route>
82
- <Route path="/favourites">
83
- <Favourites />
84
- </Route>
85
- <Route path={routes.search.path}>
86
- <SearchPage />
87
- </Route>
88
- <Route path={routes.signup.path}>
89
- <SignUpPage />
90
- </Route>
91
- <Route path={routes.login.path}>
92
- <LogInPage />
93
- </Route>
94
- <Route path={routes.logout.path}>
95
- <LogOutPage />
96
- </Route>
97
- <Route path={routes.stores.path}>
98
- <StoreLocator />
99
- </Route>
100
- <Route path={`${routes.store.path}/:id`}>
101
- <Store />
102
- </Route>
103
- <Route path={routes.tree.path}>
104
- <NavTreePage />
105
- </Route>
106
- <Route path={routes.myPages.path}>
107
- <MyPages />
108
- </Route>
109
- <Route exact path={routes.forgotPassword.path}>
110
- <ForgotPassword />
111
- </Route>
112
- <Route path={`${routes.resetPassword.path}/:token`}>
113
- <ResetPassword />
114
- </Route>
72
+ <Route exact path="/" component={StartPage} />
73
+ <Route path="/favourites" component={Favourites} />
74
+ <Route path={routes.search.path} component={SearchPage} />
75
+ <Route path={routes.signup.path} component={SignUpPage} />
76
+ <Route path={routes.login.path} component={LogInPage} />
77
+ <Route path={routes.logout.path} component={LogOutPage} />
78
+ <Route path={routes.stores.path} component={StoreLocator} />
79
+ <Route path={`${routes.store.path}/:id`} component={Store} />
80
+ <Route path={routes.tree.path} component={NavTreePage} />
81
+ <Route path={routes.myPages.path} component={MyPages} />
82
+ <Route
83
+ exact
84
+ path={routes.forgotPassword.path}
85
+ component={ForgotPassword}
86
+ />
87
+ <Route
88
+ path={`${routes.resetPassword.path}/:token`}
89
+ component={ResetPassword}
90
+ />
115
91
  <Route
116
92
  path="/preview"
117
93
  render={props => (
118
94
  <PreviewRoute
119
- productQuery={ProductPreviewQuery}
120
- categoryQuery={CategoryPreviewQuery}
121
- pageQuery={PagePreviewQuery}
95
+ productQuery={productPreviewQuery}
96
+ categoryQuery={categoryPreviewQuery}
97
+ pageQuery={pagePreviewQuery}
122
98
  productPage={ProductPage}
123
99
  categoryPage={CategoryPage}
124
100
  contentPage={ContentPage}
@@ -2,9 +2,6 @@ import React from 'react';
2
2
  import MaxWidth from '../../Layout/MaxWidth';
3
3
  import { styled } from 'linaria/react';
4
4
  import { theme } from '../../Theme';
5
- import { ReactComponent as Caret } from '@jetshop/ui/svg/Carrot.svg';
6
- import { Above } from '@jetshop/ui/Breakpoints';
7
- import { useAnimation, swipeEffect } from '@jetshop/ui/hooks';
8
5
 
9
6
  const Container = styled('div')`
10
7
  position: relative;
@@ -37,40 +34,6 @@ const ItemsContainer = styled('div')`
37
34
  }
38
35
  `;
39
36
 
40
- const Button = styled('button')`
41
- position: absolute;
42
- font-family: initial;
43
- margin: 0 10px;
44
- top: 50%;
45
- transform: translateY(-50%);
46
- z-index: 2;
47
- width: 40px;
48
- height: 40px;
49
- border-radius: 50%;
50
- background: rgba(255, 255, 255, 0.2);
51
-
52
- &:focus,
53
- &:active {
54
- outline: none;
55
- }
56
-
57
- &:hover {
58
- background: rgba(255, 255, 255, 0.6);
59
- }
60
-
61
- &.left svg {
62
- transform: rotateZ(90deg);
63
- }
64
-
65
- &.right {
66
- right: 0;
67
-
68
- svg {
69
- transform: rotateZ(-90deg);
70
- }
71
- }
72
- `;
73
-
74
37
  const Row = ({ header, children }) => {
75
38
  return (
76
39
  <MaxWidth>
@@ -66,12 +66,20 @@ const heroStyles = css`
66
66
  justify-content: center;
67
67
  `;
68
68
 
69
- const StartPageHero = ({ header, text, buttonText, buttonLink, imageSrc }) => (
69
+ const StartPageHero = ({
70
+ header,
71
+ text,
72
+ buttonText,
73
+ buttonLink,
74
+ imageSrc,
75
+ isAboveFold
76
+ }) => (
70
77
  <StartPageHeroWrapper>
71
78
  <Image
72
79
  fillAvailableSpace={true}
73
80
  src={imageSrc.value}
74
81
  className={heroStyles}
82
+ critical={isAboveFold?.value}
75
83
  >
76
84
  <Container>
77
85
  <Title>{header.value}</Title>
@@ -2,7 +2,6 @@ import StartPageRenderer from '@jetshop/ui/StartPageRenderer';
2
2
  import React from 'react';
3
3
  import { useQuery } from 'react-apollo';
4
4
  import { styled } from 'linaria/react';
5
- import MaxWidth from '../Layout/MaxWidth';
6
5
  import LoadingPage from '../LoadingPage';
7
6
  import StartPageCampaign from './Content/StartPageCampaign';
8
7
  import StartPageCategories from './Content/StartPageCategories';
@@ -12,8 +11,6 @@ import StartPageProductGrid from './Content/StartPageProductGrid';
12
11
  import startPageQuery from './StartPageQuery.gql';
13
12
  import { StartPageCategoryItem } from './Content/StartPageCategories';
14
13
 
15
- import { theme } from '../Theme';
16
-
17
14
  const startPageComponents = {
18
15
  HERO: StartPageHero,
19
16
  HTML: StartPageHTMLContent,
@@ -29,16 +26,6 @@ const StartPageWrapper = styled('div')`
29
26
  flex-direction: column;
30
27
  `;
31
28
 
32
- export const MainSectionWrapper = styled(MaxWidth)`
33
- width: 100%;
34
- align-self: center;
35
- padding-left: 1.5rem;
36
- padding-right: 1.5rem;
37
- ${theme.below.sm} {
38
- padding-left: 0px;
39
- padding-right: 0px;
40
- }
41
- `;
42
29
  const StartPage = ({ startPageId }) => {
43
30
  const result = useQuery(startPageQuery, {
44
31
  variables: { startPageId: startPageId }
@@ -13,6 +13,7 @@ fragment StartPageProductGrid on Product {
13
13
  id
14
14
  path
15
15
  slug
16
+ breadcrumbs
16
17
  }
17
18
  ...ProductPrice
18
19
  images {
@@ -5,6 +5,7 @@ import { Link } from 'react-router-dom';
5
5
  import Spinner from './Spinner';
6
6
  import t from '@jetshop/intl';
7
7
  import { theme } from '../Theme';
8
+ import { isRelativeUrl } from '@jetshop/core/helpers/isRelativeUrl';
8
9
 
9
10
  export const baseStyles = `
10
11
  background-color: ${theme.colors.blue};
@@ -47,7 +48,7 @@ const Button = styled('button')`
47
48
  ${baseStyles};
48
49
  `;
49
50
 
50
- export const TrendLink = styled(Link)`
51
+ const TrendABase = styled('a')`
51
52
  ${baseStyles};
52
53
  text-decoration: none;
53
54
  display: flex;
@@ -56,6 +57,23 @@ export const TrendLink = styled(Link)`
56
57
  height: 54px;
57
58
  `;
58
59
 
60
+ const TrendLinkBase = styled(Link)`
61
+ ${baseStyles};
62
+ text-decoration: none;
63
+ display: flex;
64
+ justify-content: center;
65
+ align-items: center;
66
+ height: 54px;
67
+ `;
68
+
69
+ export function TrendLink({ to, ...props }) {
70
+ return typeof to === 'string' && !isRelativeUrl(to) ? (
71
+ <TrendABase href={to} {...props} />
72
+ ) : (
73
+ <TrendLinkBase to={to} {...props} />
74
+ );
75
+ }
76
+
59
77
  const StyledSpinner = styled(Spinner)`
60
78
  height: 25px;
61
79
  circle.path {
@@ -1,3 +0,0 @@
1
- .RegionName_r1biyodf{text-transform:uppercase;font-size:1rem;line-height:1.5rem;font-weight:600;margin:1rem 0 0.5rem 0;}
2
-
3
-
@@ -1,5 +0,0 @@
1
- export const PRODUCT_URL = 'se/accessories/watches/watch-classic-504';
2
- export const OUT_OF_STOCK_PRODUCT_URL = 'se/preview?articlenumber=224733';
3
- export const CATEGORY_URL = 'se/accessories/watches';
4
- export const ARTICLENUMBER_URL = 'se/articlenumber/6952315';
5
- export const US_ARTICLENUMBER_URL = 'int/articlenumber/6952315';
@@ -1,27 +0,0 @@
1
- import { PRODUCT_URL, OUT_OF_STOCK_PRODUCT_URL } from '../../constants';
2
-
3
- describe('Add to cart tests', () => {
4
- it('Will add add a basic product to the cart', () => {
5
- cy.visit(PRODUCT_URL);
6
- cy.get('button[data-testid="add-to-cart"]').click();
7
- cy.get('[data-testid="product-toast"]').should('exist');
8
- cy.get('[data-testid="cart-button"]').click();
9
- cy.get('[data-testid="item-name"]').should('not.be.empty');
10
- cy.get('[data-testid="increment-quantity"]').click();
11
- cy.get('[data-testid="item-quantity"]').should('contain', 2);
12
- cy.get('[data-testid="remove-from-cart"]').click();
13
- cy.get('[data-testid="item-name"]').should('not.exist');
14
- });
15
- it('Add to cart button is disabled if product is out of stock', () => {
16
- cy.visit(OUT_OF_STOCK_PRODUCT_URL);
17
- cy.get('button[data-testid="add-to-cart"]').should('be.disabled');
18
- });
19
- it('Checkout button is linked to the checkout', () => {
20
- cy.visit(PRODUCT_URL);
21
- cy.get('button[data-testid="add-to-cart"]').click();
22
- cy.get('button[data-testid="cart-button"]').click();
23
- cy.get('[data-testid="checkout-button"]')
24
- .should('have.attr', 'href')
25
- .and('include', 'externalcheckout');
26
- });
27
- });
@@ -1,17 +0,0 @@
1
- const PRODUCT_WITH_INVALID_VARIATIONS_URL = '/furniture/toldbod-pendant';
2
- describe('Disabled variations', () => {
3
- it('Will add a product with attributes if they have been selected', () => {
4
- cy.visit(PRODUCT_WITH_INVALID_VARIATIONS_URL);
5
- cy.get('button[data-testid="add-to-cart"]').click();
6
- cy.get('[data-testid="product-toast"]').should('not.exist');
7
- cy.findByText('Ø 250').click();
8
- cy.get('#option-Color').click();
9
- cy.findByText('White', { selector: 'li[role=menuitem]' }).click();
10
- cy.get('button[data-testid="add-to-cart"]').should('be.disabled');
11
- cy.get('#option-Color').click();
12
- cy.findByText('Black', { selector: 'li[role=menuitem]' }).click();
13
- cy.findByText('Ø 250').click();
14
- cy.get('button[data-testid="add-to-cart"]').click();
15
- cy.get('[data-testid="product-toast"]').should('exist');
16
- });
17
- });
@@ -1,24 +0,0 @@
1
- describe('Notify when back test', () => {
2
- it('Subscribes to newsletter with a random email', () => {
3
- cy.visit('/');
4
- cy.get(
5
- '[data-testid="newsletter-subscription-input"]'
6
- ).type('edgardavids@glasses.com', { force: true });
7
- cy.get('button[data-testid="newsletter-subscription-submit"]').click();
8
- cy.get('p[data-testid="newsletter-subscription-success"]').should(
9
- 'contain',
10
- 'You are now subscribed'
11
- );
12
- });
13
-
14
- it('Cannot subscribe with an invalid email', () => {
15
- cy.visit('/');
16
- cy.get(
17
- '[data-testid="newsletter-subscription-input"]'
18
- ).type('edgardavids.com', { force: true });
19
- cy.get('button[data-testid="newsletter-subscription-submit"]').click();
20
- cy.get('p[data-testid="newsletter-subscription-success"]').should(
21
- 'not.exist'
22
- );
23
- });
24
- });
@@ -1,20 +0,0 @@
1
- const PRODUCT_URL = 'accessories/glasses-black';
2
-
3
- describe('Notify when back test', () => {
4
- it('Will fill out notify when back with a test email', () => {
5
- cy.visit(PRODUCT_URL);
6
- cy.get('button[data-testid="add-to-cart"]').should('not.exist');
7
- cy.get('button[data-testid="notify-when-back-button"]').click();
8
- cy.get('input[data-testid="notify-when-back-input"]').type(
9
- 'test@example.com',
10
- {
11
- force: true
12
- }
13
- );
14
- cy.get('button[data-testid="notify-when-back-ok"]').click({ force: true });
15
- cy.get('p[data-testid="notify-when-back-success"]').should(
16
- 'contain',
17
- 'You are now subscribed'
18
- );
19
- });
20
- });
@@ -1,35 +0,0 @@
1
- const PRODUCT_URL = 'furniture/black-leather-sofa';
2
-
3
- describe('Add to cart product configuration tests', () => {
4
- it('Will add add a product with configurations', () => {
5
- cy.visit(PRODUCT_URL);
6
-
7
- cy.get('.price').should('contain', '420');
8
-
9
- cy.get('#option-Head').click();
10
- cy.findAllByRole('menuitem', { name: 'putter' }).click();
11
- cy.get('#option-Head').should('contain', 'putter');
12
-
13
- cy.get('.price').should('contain', '370');
14
-
15
- cy.get('#option-stick').click();
16
- cy.findAllByRole('menuitem', { name: 'shiny' }).click();
17
- cy.get('#option-stick').should('contain', 'shiny');
18
-
19
- cy.get('.price').should('contain', '470');
20
-
21
- cy.get('#option-grip').click();
22
- cy.findAllByRole('menuitem', { name: 'plastic' }).click();
23
- cy.get('#option-grip').should('contain', 'plastic');
24
-
25
- cy.get('.price').should('contain', '455');
26
-
27
- cy.findByRole('button', { name: /add to cart/i }).click();
28
-
29
- cy.get('[data-testid="product-toast"]').should('exist');
30
- cy.get('[data-testid="cart-button"]').click();
31
- cy.get('[data-testid="item-name"]').should('not.be.empty');
32
- cy.get('[data-testid="item-price"]').should('contain', '455');
33
- cy.get('[data-testid="cart-button"]').click();
34
- });
35
- });
@@ -1,42 +0,0 @@
1
- const PRODUCT_WITH_VARIATIONS_URL = 'furniture/armchair-lord';
2
-
3
- describe('Product variants', () => {
4
- it('can be successfully selected and added to cart', () => {
5
- cy.visit(PRODUCT_WITH_VARIATIONS_URL);
6
-
7
- cy.get('button[data-testid="add-to-cart"]').click();
8
- cy.get('[data-testid="product-toast"]').should('not.exist');
9
- cy.findByText('Small').click();
10
- cy.findByText('JA').click();
11
- cy.get('button[data-testid="add-to-cart"]').click();
12
- cy.get('[data-testid="product-toast"]').should('not.exist');
13
- cy.get('input[data-testid="Skriv in ditt önskade tryck här-input"]').type(
14
- 'Hello, World'
15
- );
16
- cy.get('button[data-testid="add-to-cart"]').click();
17
- cy.get('[data-testid="product-toast"]').should('exist');
18
- cy.get('[data-testid="cart-button"]').click();
19
- cy.get('[data-testid="item-name"]').should('not.be.empty');
20
- cy.get('[data-testid="increment-quantity"]').click();
21
- cy.get('[data-testid="item-quantity"]').should('contain', 2);
22
- cy.get('[data-testid="remove-from-cart"]').click();
23
- cy.get('[data-testid="item-name"]').should('not.exist');
24
- });
25
-
26
- describe('Preselection', () => {
27
- it('preselects variant when included in the url', () => {
28
- cy.visit('accessories/belts/belt-light?att=Mzg=');
29
- cy.get('[aria-pressed="true"]').should('contain', '38');
30
- });
31
-
32
- it('preselects the cheapest variant by default', () => {
33
- cy.visit('accessories/belts/belt-light');
34
- cy.get('[aria-pressed="true"]').should('contain', '37');
35
-
36
- cy.visit('/furniture/aj-floor-lamp');
37
- cy.get('[aria-pressed="true"]')
38
- .should('contain', 'Black')
39
- .should('contain', '140');
40
- });
41
- });
42
- });
@@ -1,20 +0,0 @@
1
- const PRODUCT_URL = 'accessories/belt-light';
2
-
3
- describe('Produce price', () => {
4
- it('changes when variant is changed', () => {
5
- cy.visit(PRODUCT_URL);
6
- cy.get('.new-price').should('contain', '499');
7
- cy.findByText('36').click();
8
- cy.get('.new-price').should('contain', '563');
9
- cy.findByText('38').click();
10
- cy.get('.new-price').should('contain', '500');
11
- cy.get('button[data-testid="add-to-cart"]').click();
12
- cy.get('[data-testid="product-toast"]').should('exist');
13
- cy.get('[data-testid="cart-button"]').click();
14
- cy.get('[data-testid="item-name"]').should('not.be.empty');
15
- cy.get('.price')
16
- .first()
17
- .should('contain', '500');
18
- cy.get('[data-testid="cart-button"]').click();
19
- });
20
- });