@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
@@ -1,87 +0,0 @@
1
- import { callsTo } from '../../support/dataLayer';
2
- import { PRODUCT_URL, CATEGORY_URL } from '../../constants';
3
- const eventMatcher = eventName => [
4
- function eventMatcher(calls) {
5
- return calls.find(call => call[0] === 'event' && call[1] === eventName);
6
- },
7
- `Event ${eventName} is pushed to dataLayer`
8
- ];
9
-
10
- const pageviewMatcher = path => [
11
- function pageviewMatcher(calls) {
12
- const pageViewCall = calls.find(
13
- call => call[0] === 'event' && call[1] === 'page_view'
14
- );
15
- return pageViewCall.length > 0;
16
- },
17
- `Page View for "${path}" is pushed to dataLayer`
18
- ];
19
-
20
- describe('Analytics: GTAG – Google Analytics', () => {
21
- it('Start Page: Should trigger view events', () => {
22
- cy.visit('/');
23
- cy.get('@gtm_dataLayer_push').should(push => {
24
- expect(callsTo(push)).to.satisfy(...eventMatcher('view_item_list'));
25
- expect(callsTo(push)).to.satisfy(...pageviewMatcher('/'));
26
- });
27
- });
28
-
29
- it('Category Page: Should trigger view events', () => {
30
- cy.visit(CATEGORY_URL);
31
- cy.get('@gtm_dataLayer_push').should(push => {
32
- expect(callsTo(push)).to.satisfy(...eventMatcher('view_item_list'));
33
- expect(callsTo(push)).to.satisfy(...pageviewMatcher(CATEGORY_URL));
34
- });
35
- });
36
-
37
- it('Category Page: Should trigger click events', () => {
38
- cy.visit(CATEGORY_URL);
39
-
40
- cy.findAllByTestId('product').first().click();
41
-
42
- cy.get('@gtm_dataLayer_push').should(push => {
43
- expect(callsTo(push)).to.satisfy(...eventMatcher('select_content'));
44
- });
45
- });
46
-
47
- it('Product Page: Should trigger view events', () => {
48
- cy.visit(PRODUCT_URL);
49
- cy.get('@gtm_dataLayer_push').should(push => {
50
- expect(callsTo(push)).to.satisfy(...eventMatcher('view_item'));
51
- expect(callsTo(push)).to.satisfy(...pageviewMatcher(PRODUCT_URL));
52
- });
53
- });
54
-
55
- it('Product Page: Should trigger cart events', () => {
56
- cy.visit(PRODUCT_URL);
57
-
58
- // Add to cart
59
- cy.findByTestId('add-to-cart').click({ force: true });
60
- cy.get('@gtm_dataLayer_push').should(push => {
61
- expect(callsTo(push)).to.satisfy(...eventMatcher('add_to_cart'));
62
- });
63
-
64
- // Remove from to cart
65
- cy.findByTestId('cart-button').click({ force: true });
66
- cy.findByTestId('remove-from-cart').first().click();
67
- cy.get('@gtm_dataLayer_push').should(push => {
68
- expect(callsTo(push)).to.satisfy(...eventMatcher('remove_from_cart'));
69
- });
70
- });
71
-
72
- it('Product Page: Attribute click events to the appropriate list and apppropriate currency', () => {
73
- cy.visit(CATEGORY_URL);
74
-
75
- cy.findAllByTestId('product').first().click();
76
-
77
- cy.findByTestId('add-to-cart').click({ force: true });
78
- cy.get('@gtm_dataLayer_push').should(push => {
79
- const addToCartEvent = callsTo(push).find(
80
- ev => Array.isArray(ev) && ev[1] === 'add_to_cart'
81
- );
82
- expect(addToCartEvent[2].currency).to.equal('SEK');
83
- expect(addToCartEvent[2].items[0].list_name).to.equal('Watches');
84
- expect(callsTo(push)).to.satisfy(...eventMatcher('add_to_cart'));
85
- });
86
- });
87
- });
@@ -1,95 +0,0 @@
1
- import { PRODUCT_URL } from '../../constants';
2
-
3
- // const BASE_EVENT = {
4
- // itemId: '155',
5
- // accountId: 'jetshop',
6
- // siteId: 'localhost'
7
- // };
8
-
9
- function getRelewareCalls(spy) {
10
- return spy
11
- .getCalls()
12
- .filter(call => call.args[0].indexOf('log.releware.net') > -1)
13
- .map(call => {
14
- const query = new URL(call.args[0]).searchParams;
15
- return {
16
- itemId: query.get('_item_id'),
17
- accountId: query.get('aid'),
18
- event: query.get('o'),
19
- siteId: query.get('sid')
20
- };
21
- });
22
- }
23
-
24
- describe('Analytics: Releware', () => {
25
- beforeEach(function() {
26
- // Stub window.fetch before any app code runs
27
- cy.on('window:before:load', win => {
28
- const doFetch = win.fetch;
29
- cy.stub(win, 'fetch', (path, options) => {
30
- if (path.indexOf('log.releware.net') > -1) {
31
- return Promise.resolve();
32
- }
33
- return doFetch(path, options);
34
- }).as('fetch');
35
- });
36
- });
37
-
38
- // FIXME: The heed_recommendation event is not implemented in this template
39
- // yet. This test (modified to target the correct list) should pass
40
- // once it is.
41
- //
42
- // it('Category Page: Should trigger click events for recommendations', () => {
43
- // cy.visit(CATEGORY_URL);
44
-
45
- // cy.getByTestId('product')
46
- // .first()
47
- // .click();
48
-
49
- // cy.get('@fetch').should(spy => {
50
- // const calls = getRelewareCalls(spy);
51
-
52
- // expect(calls).to.have.lengthOf(1);
53
- // expect(calls).to.deep.equal([
54
- // { ...BASE_EVENT, event: 'heed_recommendation' }
55
- // ]);
56
- // });
57
- // });
58
-
59
- it('Product Page: Should trigger view events', () => {
60
- cy.visit(PRODUCT_URL);
61
- cy.get('@fetch').should(spy => {
62
- const calls = getRelewareCalls(spy);
63
-
64
- expect(calls).to.have.lengthOf(1);
65
- expect(calls[0].event).to.equal('view_item');
66
- });
67
- });
68
-
69
- it('Product Page: Should trigger cart events', () => {
70
- cy.visit(PRODUCT_URL);
71
- cy.findByTestId('add-to-cart').click();
72
-
73
- cy.get('@fetch').should(spy => {
74
- const calls = getRelewareCalls(spy);
75
- expect(calls).to.have.lengthOf(2);
76
- expect(calls[1].event).to.equal('pick_item');
77
- });
78
-
79
- // FIXME: How to implement this is not mentioned in any of the releware
80
- // docs, it might be so that they only track add events.
81
- //
82
- // cy.getByTestId('header-cart')
83
- // .click({ force: true })
84
- // .getByTestId('remove-from-cart')
85
- // .first()
86
- // .click();
87
- // cy.get('@fetch').should(spy => {
88
- // const calls = getRelewareCalls(spy);
89
- // expect(calls).to.have.lengthOf(3);
90
- // expect(calls.slice(2)).to.deep.equal([
91
- // { ...BASE_EVENT, event: '???' }
92
- // ]);
93
- // });
94
- });
95
- });
@@ -1,18 +0,0 @@
1
- describe('Log In', () => {
2
- it('Will show an error when the user enters bad credentials', () => {
3
- cy.visit('/se/login');
4
- cy.get('#email').type('test@test.com');
5
- cy.get('#password').type('iamanonsensepassword');
6
- cy.get('button[type="submit"]').contains('Log in').click();
7
- cy.findByText('Login failed. Please try again').should('exist');
8
- });
9
-
10
- it('Will log a user in with correct credentials', () => {
11
- cy.visit('/se/login');
12
- cy.get('#email').type('wolverine@jetshop.se');
13
- cy.get('#password').type('jetshop');
14
- cy.get('button[type="submit"]').contains('Log in').click();
15
- cy.findByText('Login failed. Please try again').should('not.exist');
16
- cy.url().should('contain', 'my-pages');
17
- });
18
- });
@@ -1,98 +0,0 @@
1
- function randomString() {
2
- return Math.random().toString(25);
3
- }
4
-
5
- describe('User can sign up', () => {
6
- it('as a private customer', () => {
7
- cy.visit('/se/signup');
8
-
9
- cy.get("input[name='pid']").type('test');
10
- cy.get("input[name='firstName']").type('Private');
11
- cy.get("input[name='lastName']").type('Customer');
12
- cy.get("input[name='streetName']").type('test');
13
- cy.get("input[name='postalCode']").type('51234');
14
- cy.get("input[name='city']").type('test');
15
- cy.get("input[name='emailAddress']").type(`${randomString()}@test.com`);
16
- cy.get("input[name='password']").type('cypresstest');
17
- cy.get('[data-testid="sign-up-button"]').click();
18
-
19
- cy.get('h2[data-testid="customer-name"]').should(
20
- 'contain',
21
- 'Private Customer'
22
- );
23
-
24
- cy.get('a[href="/se/my-pages/profile"]').click();
25
-
26
- cy.get('input[type="checkbox"][name="confirm"]').click({ force: true });
27
-
28
- cy.get('button[type="submit"]').contains('Delete account').click();
29
- });
30
- it('as a business customer', () => {
31
- cy.visit('/se/signup');
32
-
33
- cy.get('input[type="radio"][value="company"]').click({ force: true });
34
- cy.get("input[name='organizationNumber']").type('test');
35
- cy.get("input[name='company']").type('test');
36
- cy.get("input[name='companyAtt']").type('test');
37
- cy.get("input[name='department']").type('test');
38
- cy.get("input[name='firstName']").type('test');
39
- cy.get("input[name='lastName']").type('test');
40
- cy.get("input[name='streetName']").type('test');
41
- cy.get("input[name='postalCode']").type('51234');
42
- cy.get("input[name='city']").type('test');
43
- cy.get("input[name='emailAddress']").type(
44
- `${randomString()}@business-test.com`
45
- );
46
- cy.get("input[name='password']").type('cypresstest');
47
- cy.get('[data-testid="sign-up-button"]').click();
48
-
49
- cy.get('a[href="/se/my-pages/profile"]').click();
50
-
51
- cy.get('input[type="checkbox"][name="confirm"]').click({ force: true });
52
-
53
- cy.get('button[type="submit"]').contains('Delete account').click();
54
-
55
- cy.get('span').contains('Log in').should('be.visible');
56
- });
57
- it('with encrypted values', () => {
58
- cy.visit('/se/signup');
59
-
60
- cy.get("input[name='pid']").type('test');
61
- cy.get("input[name='firstName']").type('eTZ7FGaVn/RAThBesp3unQ==');
62
- cy.get("input[name='lastName']").type('Pehrers');
63
- cy.get("input[name='streetName']").type('test');
64
- cy.get("input[name='postalCode']").type('51234');
65
- cy.get("input[name='city']").type('test');
66
- cy.get("input[name='emailAddress']").type(`${randomString()}@test.com`);
67
- cy.get("input[name='password']").type('cypresstest');
68
- cy.get('[data-testid="sign-up-button"]').click();
69
-
70
- cy.get('a[href="/se/my-pages/profile"]').click();
71
- cy.get('h2[data-testid="customer-name"]').should('contain', 'Erik Pehrers');
72
-
73
- cy.get('input[type="checkbox"][name="confirm"]').click({ force: true });
74
-
75
- cy.get('button[type="submit"]').contains('Delete account').click();
76
-
77
- cy.get('span').contains('Log in').should('be.visible');
78
- });
79
-
80
- it('Displays email validation error', () => {
81
- cy.visit('/se/signup');
82
-
83
- cy.get("input[name='pid']").type('test');
84
- cy.get("input[name='firstName']").type('integrationtest');
85
- cy.get("input[name='lastName']").type('E god');
86
- cy.get("input[name='streetName']").type('test');
87
- cy.get("input[name='postalCode']").type('51234');
88
- cy.get("input[name='city']").type('test');
89
- cy.get("input[name='emailAddress']").type('kantarellen@egod.com');
90
- cy.get("input[name='password']").type('cypresstest');
91
- cy.get('[data-testid="sign-up-button"]').click();
92
-
93
- cy.get('div[data-testid="validation-error"]').should(
94
- 'contain',
95
- 'The specified e-mail address is already registered.'
96
- );
97
- });
98
- });
@@ -1,73 +0,0 @@
1
- import { CATEGORY_URL } from '../constants';
2
-
3
- const ACCESSORIES_URL = '/accessories';
4
- const FURNITURE_URL = '/furniture';
5
- const CAMPAIGN_URL = '/campaigns';
6
-
7
- describe('Category Page', () => {
8
- beforeEach(() => cy.visit(`${ACCESSORIES_URL}?channelCountry=US`));
9
- it('Loads the right header', () => {
10
- cy.findByTestId('page-header').should('contain', 'Accessories');
11
- });
12
-
13
- it('Can handle pagination', () => {
14
- cy.visit(`${ACCESSORIES_URL}?channelCountry=US&standardPagination=true`);
15
- cy.get('a')
16
- .contains('Next')
17
- .click();
18
- cy.url().should('contain', 'page=2');
19
- cy.get('#root').should('contain', 'Page 2 of 2');
20
- cy.get('a')
21
- .contains('Prev')
22
- .click();
23
- cy.url().should('not.contain', 'page=2');
24
- });
25
- });
26
-
27
- describe('Infinite pagination', () => {
28
- it('has non moving scroll position on fetch', () => {
29
- let yOffset;
30
- cy.visit(CAMPAIGN_URL);
31
- cy.scrollTo('bottom');
32
- cy.window()
33
- .then(win => {
34
- yOffset = win.pageYOffset;
35
- })
36
- .then(() => {
37
- cy.get('a')
38
- .contains('Show more')
39
- .click();
40
- cy.wait(2000);
41
- cy.window()
42
- .its('pageYOffset')
43
- .should('equal', yOffset);
44
- });
45
- });
46
- it('paginates correctly when retreiving more products', () => {
47
- cy.visit(FURNITURE_URL);
48
- cy.get('a')
49
- .contains('Show more')
50
- .click();
51
- cy.wait(2000);
52
- cy.scrollTo('bottom');
53
- cy.url().should('contain', 'page=2');
54
- cy.scrollTo('top');
55
- cy.url().should('not.contain', 'page=2');
56
- });
57
- });
58
-
59
- describe('product browsing', () => {
60
- describe('news category', () => {
61
- beforeEach(() => cy.visit(`${CATEGORY_URL}?channelCountry=US`));
62
-
63
- it('contains a category description', () => {
64
- cy.findByTestId('category-description');
65
- });
66
-
67
- it('contains a product grid with products', () => {
68
- cy.findByTestId('product-grid').within(() =>
69
- cy.findAllByTestId('product')
70
- );
71
- });
72
- });
73
- });
@@ -1,103 +0,0 @@
1
- const BIKES_URL = '/bikes';
2
- const SEARCH_URL = '/se/search/?term=city';
3
- const FURNITURE_URL = '/furniture';
4
- const PRODUCT_NAME_TO_CHECK = 'Toldbod Pendant';
5
- describe('Filters', () => {
6
- it('Has a working default in stock filter on categories', () => {
7
- cy.visit(`${BIKES_URL}?channelCountry=US`);
8
- cy.get('input[type=checkbox]').should('be.checked');
9
- cy.contains('City Racer_ 2').should('not.exist');
10
- cy.get('label').contains('In stock').click();
11
- cy.url().should('include', 'boolean[150:buyable]=false');
12
- cy.contains('City Racer_ 2').should('exist');
13
- });
14
-
15
- it('Has a working default in stock filter on search', () => {
16
- cy.visit(`${SEARCH_URL}&channelCountry=US`);
17
- cy.get('input[type=checkbox]').should('be.checked');
18
- cy.contains('City Racer_ 2').should('not.exist');
19
- cy.get('label').contains('In stock').click();
20
- cy.url().should('include', 'boolean[buyable]=false');
21
- cy.contains('City Racer_ 2').should('exist');
22
- });
23
-
24
- it('Non-default filters should be un-chcked', () => {
25
- cy.visit(`${FURNITURE_URL}?channelCountry=US`);
26
- cy.get('input[type=checkbox]').should('not.be.checked');
27
- });
28
-
29
- it('Applies filters when returning to category from product', () => {
30
- cy.visit(FURNITURE_URL);
31
- cy.get('.product-card-detail')
32
- .contains(PRODUCT_NAME_TO_CHECK)
33
- .should('exist');
34
- cy.get('button[data-flight-dropdown-button] > span')
35
- .contains('Brand')
36
- .click();
37
- cy.get('li[data-flight-dropdown-item] > span').contains('Cartels').click();
38
- cy.get('.product-card-detail')
39
- .contains(PRODUCT_NAME_TO_CHECK)
40
- .should('not.exist');
41
- cy.get('.product-card-detail').click();
42
- cy.go('back');
43
- cy.get('.product-card-detail')
44
- .contains(PRODUCT_NAME_TO_CHECK)
45
- .should('not.exist');
46
- });
47
-
48
- it('Persists filters when applying sort', () => {
49
- cy.visit(FURNITURE_URL);
50
- cy.get('button[data-flight-dropdown-button] > span')
51
- .contains('Brand')
52
- .click();
53
- cy.get('li[data-flight-dropdown-item] > span').contains('Cartels').click();
54
- cy.get('button[data-flight-dropdown-button] > span')
55
- .contains('Sort By')
56
- .click();
57
- cy.get('li[data-flight-dropdown-item] > span')
58
- .contains('Date added')
59
- .click();
60
-
61
- // logically working
62
- cy.get('.product-card-detail')
63
- .contains(PRODUCT_NAME_TO_CHECK)
64
- .should('not.exist');
65
-
66
- // also shown in ui
67
- cy.get('aside > button').contains('Clear all filters').should('exist');
68
- });
69
-
70
- it('Persists filters when paginating', () => {
71
- cy.visit('/accessories?standardPagination=true');
72
- cy.get('button[data-flight-dropdown-button] > span')
73
- .contains('Categories')
74
- .click();
75
- cy.get('li[data-flight-dropdown-item] > span').as('listOfCategories');
76
- cy.get('@listOfCategories').contains('Watches').click();
77
- cy.get('@listOfCategories').contains('Glasses').click();
78
- cy.get('@listOfCategories').contains('Bags').click();
79
-
80
- cy.get('.product-card-detail').contains('Belt Light').should('not.exist');
81
-
82
- cy.get('a').contains('Next').click();
83
-
84
- cy.get('.product-card-detail').contains('Belt Light').should('not.exist');
85
- });
86
-
87
- it('Persists filters when infinite paginating', () => {
88
- cy.visit('/accessories');
89
- cy.get('button[data-flight-dropdown-button] > span')
90
- .contains('Categories')
91
- .click();
92
- cy.get('li[data-flight-dropdown-item] > span').as('listOfCategories');
93
- cy.get('@listOfCategories').contains('Watches').click();
94
- cy.get('@listOfCategories').contains('Glasses').click();
95
- cy.get('@listOfCategories').contains('Bags').click();
96
-
97
- cy.get('.product-card-detail').contains('Belt Light').should('not.exist');
98
-
99
- cy.get('a').contains('Show more').click();
100
-
101
- cy.get('.product-card-detail').contains('Belt Light').should('not.exist');
102
- });
103
- });
@@ -1,28 +0,0 @@
1
- import { ARTICLENUMBER_URL, US_ARTICLENUMBER_URL } from '../constants';
2
-
3
- describe('Visiting /articlenumber/:articlenumber', () => {
4
- it('does a redirect on the server to the correct product', () => {
5
- cy.request(ARTICLENUMBER_URL)
6
- .its('body')
7
- .should('include', '>Toldbod Pendant</h1>');
8
- });
9
- it("returns the startpage if the product isn't found", () => {
10
- cy.request('/articlenumber/quepasa_quepasa')
11
- .its('body')
12
- .should('include', 'Selected Categories</h2>');
13
- });
14
- it('redirect to login if login required', () => {
15
- cy.request(
16
- US_ARTICLENUMBER_URL +
17
- '?culture=en-US&currency=USD&channelCountry=US&channel=M7-GLOBAL'
18
- ).then(res => {
19
- expect(res.redirects).to.have.length(1);
20
- expect(res.redirects[0]).to.include('/login');
21
- });
22
- });
23
- it('handles preselected variants', () => {
24
- cy.visit(ARTICLENUMBER_URL + '-170-white');
25
- cy.get('button[aria-pressed="true"]').should('contain', '170');
26
- cy.get('[data-flight-dropdown-button=""]').should('contain', 'White');
27
- });
28
- });
@@ -1,85 +0,0 @@
1
- const PRODUCT_URL = '/living-room-furniture-pack';
2
-
3
- describe('Package products', () => {
4
- it('will preselect the cheapest variants', () => {
5
- cy.visit(PRODUCT_URL);
6
- cy.get('[aria-pressed="true"]')
7
- .should('contain', 'Black')
8
- .should('contain', '140');
9
-
10
- cy.get('[data-testid=package-product-add-to-cart]')
11
- .contains('Add to cart') // check that the button reads 'add to cart' (after transitioning from 'updating price')
12
- .click();
13
- cy.get('[data-testid="cart-button"]').click();
14
- cy.get('[data-testid="item-name"').should('have.length', 5);
15
- });
16
-
17
- it('should update the price when variants are selected', () => {
18
- cy.visit(PRODUCT_URL);
19
-
20
- cy.get('[data-testid="package-price-total"] > div').should($div => {
21
- const totalPrice = parseFloat($div.text().replace(/\D+/g, ''));
22
- expect(totalPrice).to.be.eq(104498);
23
- });
24
-
25
- cy.get('[data-testid=ColorWhite]').click();
26
- cy.get('[data-testid=Height120]').click();
27
-
28
- cy.get('[data-testid=package-product-add-to-cart]').contains('Add to cart'); // check that the button reads 'add to cart' (after transitioning from 'updating price')
29
-
30
- cy.get('[data-testid="package-price-total"] > div').should($div => {
31
- const totalPrice = parseFloat($div.text().replace(/\D+/g, ''));
32
- expect(totalPrice).to.be.eq(106298);
33
- });
34
- });
35
-
36
- it('should update the item price when variants are selected', () => {
37
- cy.visit(PRODUCT_URL);
38
-
39
- cy.get('.package-product-price')
40
- .first()
41
- .children()
42
- .last()
43
- .as('item-price');
44
-
45
- cy.get('@item-price')
46
- .last()
47
- .should($div => {
48
- const totalPrice = parseFloat($div.text().replace(/\D+/g, ''));
49
- expect(totalPrice).to.be.eq(8000);
50
- });
51
-
52
- cy.get('[data-testid=ColorWhite]').click();
53
- cy.get('[data-testid=Height120]').click();
54
-
55
- cy.get('@item-price')
56
- .last()
57
- .should($div => {
58
- const totalPrice = parseFloat($div.text().replace(/\D+/g, ''));
59
- expect(totalPrice).to.be.eq(10000);
60
- });
61
- });
62
-
63
- it('can not be added to the cart without selected variants', () => {
64
- cy.visit(PRODUCT_URL);
65
- cy.get('[data-testid=ColorWhite]').click();
66
- cy.get('[data-testid=package-product-add-to-cart]').click();
67
- cy.get('[data-testid="cart-button"]').click();
68
- // Wait for cart to update
69
- cy.get('[data-testid=package-product-add-to-cart]').contains(
70
- 'Select the variants'
71
- );
72
- cy.get('[data-testid="item-name"').should('not.exist');
73
- });
74
-
75
- it('can be added to the cart after selecting the appropriate options', () => {
76
- cy.visit(PRODUCT_URL);
77
- cy.get('[data-testid=ColorWhite]').click();
78
- cy.get('[data-testid=Height120]').click();
79
- cy.get('[data-testid=package-product-add-to-cart]')
80
- .contains('Add to cart') // check that the button reads 'add to cart' (after transitioning from 'updating price')
81
- .click();
82
- cy.get('[data-testid="cart-button"]').click();
83
- cy.get('[data-testid="item-name"').should('have.length', 5);
84
- });
85
- });
@@ -1,26 +0,0 @@
1
- import { CATEGORY_URL, PRODUCT_URL } from '../constants';
2
-
3
- describe('Preload Link header', () => {
4
- it('Sets appropriate preload Link header on the home page', () => {
5
- cy.request({
6
- url: '/'
7
- }).then(res => {
8
- expect(res.headers).to.have.property('link');
9
- expect(res.headers.link).to.match(/^<([^\s>]+.[js|css])>/);
10
- });
11
- });
12
-
13
- it('Sets appropriate preload Link header on Category page', () => {
14
- cy.request(`/${CATEGORY_URL}?channelCountry=US`).then(res => {
15
- expect(res.headers).to.have.property('link');
16
- expect(res.headers.link).to.include('static/js/');
17
- });
18
- });
19
- it('Sets appropriate preload Link header on Product page for both jss and css', () => {
20
- cy.request(`/${PRODUCT_URL}?channelCountry=US`).then(res => {
21
- expect(res.headers).to.have.property('link');
22
- expect(res.headers.link).to.include('static/js/');
23
- expect(res.headers.link).to.include('static/css/');
24
- });
25
- });
26
- });
@@ -1,17 +0,0 @@
1
- import { CATEGORY_URL } from '../constants';
2
-
3
- describe('product browsing', () => {
4
- describe('news category', () => {
5
- beforeEach(() => cy.visit(`${CATEGORY_URL}?channelCountry=US`));
6
-
7
- it('contains a category description', () => {
8
- cy.findByTestId('category-description');
9
- });
10
-
11
- it('contains a product grid with products', () => {
12
- cy.findByTestId('product-grid').within(() =>
13
- cy.findAllByTestId('product')
14
- );
15
- });
16
- });
17
- });
@@ -1,28 +0,0 @@
1
- const CATEGORY_TERM = 'brand';
2
- const PRODUCT_TERM = 'bike';
3
-
4
- describe('Search autocomplete', () => {
5
- it('Returns results', () => {
6
- cy.visit('/');
7
-
8
- cy.get('#root > div > header').as('header');
9
- cy.get('@header')
10
- .find('button')
11
- .contains('Search')
12
- .click();
13
- cy.get('[data-flight-search-autocomplete-field]')
14
- .as('searchField')
15
- .click()
16
- .type(CATEGORY_TERM);
17
-
18
- cy.get('@header')
19
- .find('[data-flight-search-autocomplete-result="category"]')
20
- .should('be.visible');
21
-
22
- cy.get('@searchField').type(`{selectall}${PRODUCT_TERM}`);
23
-
24
- cy.get('@header')
25
- .find('[data-flight-search-autocomplete-result="product"]')
26
- .should('be.visible');
27
- });
28
- });