@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.
- package/.linaria-cache/packages/template-trend/src/components/Auth/LogInPage.linaria.css +4 -4
- package/.linaria-cache/packages/template-trend/src/components/Auth/Signup/Address.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/Auth/Signup/CustomerType.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/Auth/Signup/LoginFields.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/Auth/Signup/SignUpPage.linaria.css +2 -2
- package/.linaria-cache/packages/template-trend/src/components/Auth/UI/Form.linaria.css +2 -2
- package/.linaria-cache/packages/template-trend/src/components/Cart/CartButton.linaria.css +2 -2
- package/.linaria-cache/packages/template-trend/src/components/Cart/CartFlyout.linaria.css +7 -7
- package/.linaria-cache/packages/template-trend/src/components/Cart/CartItem.linaria.css +7 -7
- package/.linaria-cache/packages/template-trend/src/components/Cart/FreeShipping.linaria.css +2 -2
- package/.linaria-cache/packages/template-trend/src/components/CategoryPage/CategoryHeader.linaria.css +8 -8
- package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/ActiveFilters.linaria.css +6 -6
- package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/Filter.linaria.css +4 -4
- package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/FilterDrawer.linaria.css +4 -4
- package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/FilterDropdownMenu.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/Mobile/ActiveCarot.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/Mobile/FilterButton.linaria.css +5 -5
- package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/Mobile/ListAccordion.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/Mobile/shared/styles.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/CategoryPage/Filters/RangeFilters.linaria.css +2 -2
- package/.linaria-cache/packages/template-trend/src/components/CategoryPage/ProductCard.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/CategoryPage/ProductGrid.linaria.css +2 -2
- package/.linaria-cache/packages/template-trend/src/components/CategoryPage/ProductGridWindow.linaria.css +2 -2
- package/.linaria-cache/packages/template-trend/src/components/CategoryPage/StandardCategoryPage.linaria.css +2 -2
- package/.linaria-cache/packages/template-trend/src/components/CategoryPage/WindowedCategoryPage.linaria.css +3 -3
- package/.linaria-cache/packages/template-trend/src/components/ContentPage/ContentPage.linaria.css +3 -3
- package/.linaria-cache/packages/template-trend/src/components/CookieConsent.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/Forms/GlobalError.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/Forms/Input.linaria.css +4 -4
- package/.linaria-cache/packages/template-trend/src/components/Forms/InputStatus.linaria.css +3 -3
- package/.linaria-cache/packages/template-trend/src/components/Forms/Success.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/Layout/Container.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/Layout/Content/index.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/Layout/Footer/Footer.linaria.css +3 -3
- package/.linaria-cache/packages/template-trend/src/components/Layout/Footer/SocialLinks.linaria.css +2 -2
- package/.linaria-cache/packages/template-trend/src/components/Layout/Header/Categories/MobileCategories.linaria.css +6 -6
- package/.linaria-cache/packages/template-trend/src/components/Layout/Header/CategoryMenu/CategoryMenu.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/Layout/Header/CategoryMenu/CategoryMenuContainer.linaria.css +2 -2
- package/.linaria-cache/packages/template-trend/src/components/Layout/Header/CategoryMenu/SubMenuSection.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/Layout/Header/CategoryMenu/SubMenuWrapper.linaria.css +5 -5
- package/.linaria-cache/packages/template-trend/src/components/Layout/Header/ChannelSelector/ChannelSelector.linaria.css +2 -2
- package/.linaria-cache/packages/template-trend/src/components/Layout/Header/ChannelSelector/ChannelSelectorModal.linaria.css +2 -2
- package/.linaria-cache/packages/template-trend/src/components/Layout/Header/ChannelSelector/Selector.linaria.css +5 -5
- package/.linaria-cache/packages/template-trend/src/components/Layout/Header/Header.linaria.css +7 -7
- package/.linaria-cache/packages/template-trend/src/components/Layout/Header/Logo.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/Layout/Header/LogoSearchBar.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/Layout/Header/MobileMenu.linaria.css +6 -6
- package/.linaria-cache/packages/template-trend/src/components/Layout/Header/RecommendedChannel/ChannelBanner.linaria.css +5 -5
- package/.linaria-cache/packages/template-trend/src/components/Layout/Header/RecommendedChannel/RecommendedChannelSelector.linaria.css +9 -9
- package/.linaria-cache/packages/template-trend/src/components/Layout/Header/SearchBar.linaria.css +3 -3
- package/.linaria-cache/packages/template-trend/src/components/Layout/Header/SearchButton.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/Layout/Header/TopNav.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/Layout/MaxWidth.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/Layout/Notifications.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/LoadingPage.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/MyPages/CustomerNameHeader.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/MyPages/DeleteAccount.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/MyPages/MyPages.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/MyPages/MyPagesSidebar.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/MyPages/MyPagesStartPage.linaria.css +2 -2
- package/.linaria-cache/packages/template-trend/src/components/MyPages/Orders/ListOrder.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/MyPages/Orders/OrderDetail/ListDetail.linaria.css +4 -4
- package/.linaria-cache/packages/template-trend/src/components/MyPages/Orders/OrderDetail/OrderTotals.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/MyPages/Orders/OrderDetail/ShippingPayment.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/MyPages/Orders/OrderListPage.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/MyPages/ProfileDeliveryAddresses.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/MyPages/ProfilePage.linaria.css +4 -4
- package/.linaria-cache/packages/template-trend/src/components/NavigationTree/NavTree.linaria.css +2 -2
- package/.linaria-cache/packages/template-trend/src/components/Newsletter/NewsletterField.linaria.css +3 -3
- package/.linaria-cache/packages/template-trend/src/components/NotFoundPage.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/Pagination/Pagination.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/ProductList/AddToCart.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/ProductList/Favourite.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/ProductList/Favourites.linaria.css +2 -2
- package/.linaria-cache/packages/template-trend/src/components/ProductList/Product.linaria.css +2 -2
- package/.linaria-cache/packages/template-trend/src/components/ProductPage/AddToCart/AddToCartForm.linaria.css +3 -3
- package/.linaria-cache/packages/template-trend/src/components/ProductPage/AddToCart/ProductToast.linaria.css +9 -9
- package/.linaria-cache/packages/template-trend/src/components/ProductPage/Campaigns.linaria.css +2 -2
- package/.linaria-cache/packages/template-trend/src/components/ProductPage/ConfigurationSelector.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/ProductPage/Images/ImageContainer.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/ProductPage/PackageProduct/IncludedInPackages.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/ProductPage/PackageProduct/PackageProduct.linaria.css +2 -2
- package/.linaria-cache/packages/template-trend/src/components/ProductPage/PackageProduct/PackageProductItem.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/ProductPage/ProductInfo.linaria.css +3 -3
- package/.linaria-cache/packages/template-trend/src/components/ProductPage/ProductInfoAccordion.linaria.css +3 -3
- package/.linaria-cache/packages/template-trend/src/components/ProductPage/ProductPage.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/ProductPage/ProductPageLoadingState.linaria.css +3 -3
- package/.linaria-cache/packages/template-trend/src/components/ProductPage/RelatedProducts.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/ProductPage/StockStatus/NotifyWhenBack.linaria.css +5 -5
- package/.linaria-cache/packages/template-trend/src/components/ProductPage/StockStatus/StockOrb.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/ProductPage/StockStatus/StockStatusIndicator.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/ProductPage/StockStatus/WarehouseStock.linaria.css +2 -2
- package/.linaria-cache/packages/template-trend/src/components/ProductPage/VariantSelector.linaria.css +3 -3
- package/.linaria-cache/packages/template-trend/src/components/ProductPage/styledComponents.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/SearchPage/CategoryList.linaria.css +7 -0
- package/.linaria-cache/packages/template-trend/src/components/SearchPage/SearchMeta.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/SearchPage/SearchPage.linaria.css +3 -3
- package/.linaria-cache/packages/template-trend/src/components/SearchPage/SearchResults.linaria.css +3 -3
- package/.linaria-cache/packages/template-trend/src/components/SearchPage/SearchTerm.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/SearchPage/WindowedSearchResults.linaria.css +4 -4
- package/.linaria-cache/packages/template-trend/src/components/StartPage/CategoryList.linaria.css +6 -6
- package/.linaria-cache/packages/template-trend/src/components/StartPage/Content/Row.linaria.css +3 -3
- package/.linaria-cache/packages/template-trend/src/components/StartPage/Content/StartPageCampaign.linaria.css +7 -7
- package/.linaria-cache/packages/template-trend/src/components/StartPage/Content/StartPageCategories.linaria.css +3 -3
- package/.linaria-cache/packages/template-trend/src/components/StartPage/Content/StartPageHTMLContent.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/StartPage/Content/StartPageHero.linaria.css +6 -6
- package/.linaria-cache/packages/template-trend/src/components/StartPage/Content/StartPageProductGrid.linaria.css +2 -2
- package/.linaria-cache/packages/template-trend/src/components/StartPage/StartPage.linaria.css +1 -2
- package/.linaria-cache/packages/template-trend/src/components/Store/Store.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/StoreLocator/StoreList.linaria.css +5 -5
- package/.linaria-cache/packages/template-trend/src/components/StoreLocator/StoreLocator.linaria.css +5 -5
- package/.linaria-cache/packages/template-trend/src/components/StoreLocator/StoreMap.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/StoreLocator/StoreMarker.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/StoreLocator/StoreSearch.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/StoreLocator/UserLocation.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/ui/Badge.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/ui/Button.linaria.css +4 -3
- package/.linaria-cache/packages/template-trend/src/components/ui/CloseButton.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/ui/Headings.linaria.css +2 -2
- package/.linaria-cache/packages/template-trend/src/components/ui/Spinner.linaria.css +1 -1
- package/.linaria-cache/packages/ui/Breadcrumbs/Breadcrumbs.linaria.css +2 -2
- package/.linaria-cache/packages/ui/Button/Button.linaria.css +2 -2
- package/.linaria-cache/packages/ui/Button/SecondaryButton.linaria.css +1 -1
- package/.linaria-cache/packages/ui/Button/TrendButton.linaria.css +1 -1
- package/.linaria-cache/packages/ui/ChannelSelector/ChannelSelector.linaria.css +1 -1
- package/.linaria-cache/packages/ui/ChannelSelector/ChannelSelectorButtons.linaria.css +2 -2
- package/.linaria-cache/packages/ui/ChannelSelector/LargeSelector.linaria.css +1 -1
- package/.linaria-cache/packages/ui/ChannelSelector/MiniSelector.linaria.css +1 -1
- package/.linaria-cache/packages/ui/Checkbox/Checkbox.linaria.css +4 -4
- package/.linaria-cache/packages/ui/Checkbox/CheckboxGroup.linaria.css +2 -2
- package/.linaria-cache/packages/ui/DropdownMenu/DropdownMenu.linaria.css +2 -2
- package/.linaria-cache/packages/ui/ErrorBoundary/Generic.linaria.css +1 -1
- package/.linaria-cache/packages/ui/Gallery/Gallery.linaria.css +2 -2
- package/.linaria-cache/packages/ui/JetshopText.linaria.css +1 -1
- package/.linaria-cache/packages/ui/Loading/LoadingBar.linaria.css +2 -2
- package/.linaria-cache/packages/ui/Modal/Drawer/Drawer.linaria.css +1 -1
- package/.linaria-cache/packages/ui/Modal/ModalRoot.linaria.css +1 -1
- package/.linaria-cache/packages/ui/Modal/TargetWrapper.linaria.css +1 -1
- package/.linaria-cache/packages/ui/Pagination/Pagination.linaria.css +1 -1
- package/.linaria-cache/packages/ui/PreOrderDateSelector/PreOrderDateSelector.linaria.css +1 -1
- package/.linaria-cache/packages/ui/Price/Price.linaria.css +1 -1
- package/.linaria-cache/packages/ui/ProductList/Badges.linaria.css +7 -7
- package/.linaria-cache/packages/ui/ProductSpecifications/ProductSpecifications.linaria.css +1 -1
- package/.linaria-cache/packages/ui/Search/SearchField.linaria.css +5 -5
- package/.linaria-cache/packages/ui/Search/SearchPage/SearchMeta.linaria.css +1 -1
- package/.linaria-cache/packages/ui/Select/Components.linaria.css +8 -8
- package/.vscode/launch.json +11 -0
- package/README.md +118 -1944
- package/cypress/integration/essentials.spec.js +50 -0
- package/package.json +5 -5
- package/schema.graphql +1 -0
- package/src/components/Auth/ForgotPassword.js +3 -8
- package/src/components/Auth/README.md +5 -0
- package/src/components/Cart/CartButton.js +40 -44
- package/src/components/Cart/CartFlyout.js +8 -5
- package/src/components/Cart/CartItem.js +12 -15
- package/src/components/Cart/{addMultipleToCart.gql → queries/addMultipleToCart.gql} +1 -1
- package/src/components/Cart/{addToCart.gql → queries/addToCart.gql} +1 -1
- package/src/components/Cart/{CartFragment.gql → queries/cartFragment.gql} +2 -5
- package/src/components/Cart/{CartQuery.gql → queries/cartQuery.gql} +1 -1
- package/src/components/Cart/{decrementQuantity.gql → queries/decrementQuantity.gql} +1 -1
- package/src/components/Cart/{incrementQuantity.gql → queries/incrementQuantity.gql} +1 -1
- package/src/components/Cart/{removeFromCart.gql → queries/removeFromCart.gql} +1 -1
- package/src/components/CategoryPage/CategoryHeader.js +3 -3
- package/src/components/CategoryPage/CategoryPage.js +1 -0
- package/src/components/CategoryPage/Filters/ListFilters.js +1 -2
- package/src/components/CategoryPage/ProductCard.js +3 -1
- package/src/components/CategoryPage/ProductGrid.js +8 -2
- package/src/components/CategoryPage/ProductGridWindow.js +22 -14
- package/src/components/CategoryPage/README.md +11 -0
- package/src/components/CategoryPage/StandardCategoryPage.js +2 -0
- package/src/components/CategoryPage/WindowedCategoryPage.js +13 -5
- package/src/components/Forms/Input.js +3 -6
- package/src/components/Layout/Header/AutocompleteQuery.gql +1 -6
- package/src/components/Layout/Header/ChannelSelector/ChannelSelector.js +3 -0
- package/src/components/Layout/Header/ChannelSelector/ChannelSelectorModal.js +4 -3
- package/src/components/Layout/Header/ChannelSelector/Selector.js +2 -0
- package/src/components/Layout/Header/RecommendedChannel/RecommendedChannelSelector.js +3 -1
- package/src/components/Layout/Header/TopNav.js +13 -11
- package/src/components/LogOut.loadable.js +10 -0
- package/src/components/MyPages/MyPagesSidebar.js +0 -1
- package/src/components/PreviewRoute.loadable.js +10 -0
- package/src/components/ProductList/AddToCart.js +8 -5
- package/src/components/ProductList/Favourite.js +2 -2
- package/src/components/ProductList/FavouriteCount.js +2 -2
- package/src/components/ProductList/Favourites.js +17 -12
- package/src/components/ProductList/Lister.js +44 -0
- package/src/components/ProductList/Product.js +5 -4
- package/src/components/ProductList/ProductLists.gql +8 -5
- package/src/components/ProductList/SelectVariant.js +6 -10
- package/src/components/ProductList/productListQueries.js +5 -0
- package/src/components/ProductPage/AddToCart/AddToCartForm.js +19 -18
- package/src/components/ProductPage/AddToCart/ProductToast.js +7 -4
- package/src/components/ProductPage/Images/ImageContainer.js +12 -1
- package/src/components/ProductPage/PackageProduct/PackageProduct.js +8 -6
- package/src/components/ProductPage/ProductInfo.js +1 -1
- package/src/components/ProductPage/ProductPage.js +3 -5
- package/src/components/ProductPage/ProductPageFragment.gql +1 -0
- package/src/components/ProductPage/StockStatus/WarehouseStock.js +15 -17
- package/src/components/ProductPage/VariantSelector.js +1 -1
- package/src/components/RouteQuery.gql +2 -2
- package/src/components/{StartPage → SearchPage}/CategoryList.js +6 -4
- package/src/components/SearchPage/EmptySearchResults.js +1 -1
- package/src/components/Shop.js +52 -76
- package/src/components/StartPage/Content/Row.js +0 -37
- package/src/components/StartPage/Content/StartPageHero.js +9 -1
- package/src/components/StartPage/StartPage.js +0 -13
- package/src/components/StartPage/StartPageProductGridFragment.gql +1 -0
- package/src/components/ui/Button.js +19 -1
- package/.linaria-cache/packages/ui/ChannelSelector/Region.linaria.css +0 -3
- package/cypress/constants.js +0 -5
- package/cypress/integration/addToCart/addToCart.spec.js +0 -27
- package/cypress/integration/addToCart/disabledVariations.spec.js +0 -17
- package/cypress/integration/addToCart/newslettersubscriber.spec.js +0 -24
- package/cypress/integration/addToCart/notifyWhenBackInStock.spec.js +0 -20
- package/cypress/integration/addToCart/productConfigurations.spec.js +0 -35
- package/cypress/integration/addToCart/productVariations.spec.js +0 -42
- package/cypress/integration/addToCart/sizePriceChange.spec.js +0 -20
- package/cypress/integration/analytics/gtag.spec.js +0 -87
- package/cypress/integration/analytics/releware.spec.js +0 -95
- package/cypress/integration/auth/login.spec.js +0 -18
- package/cypress/integration/auth/signup.spec.js +0 -98
- package/cypress/integration/category_page_spec.js +0 -73
- package/cypress/integration/filters.spec.js +0 -103
- package/cypress/integration/getbyarticlenumber.spec.js +0 -28
- package/cypress/integration/packages.spec.js +0 -85
- package/cypress/integration/prefetch_headers_spec.js +0 -26
- package/cypress/integration/product_browsing_spec.js +0 -17
- package/cypress/integration/search/autocomplete.spec.js +0 -28
- package/cypress/integration/search/search_page.spec.js +0 -39
- package/cypress/integration/ssr/categorySSR.js +0 -9
- package/cypress/integration/ssr/productSSR.js +0 -9
- package/cypress/integration/ssr/startPageSSR.js +0 -5
- package/cypress/integration/start_page_spec.js +0 -5
- package/cypress/integration/stores_page.spec.js +0 -5
- package/src/components/StartPage/Campaign.js +0 -162
- package/src/components/StartPage/CampaignHeader.js +0 -101
- package/src/components/StartPage/ExtraDetails.js +0 -72
- package/src/components/StartPage/Readme.md +0 -88
- package/src/components/StartPage/campaign.json +0 -20
- package/src/components/StartPage/campaignHeader.json +0 -5
- package/src/components/StartPage/categoryList.json +0 -65
- package/src/components/StartPage/extraDetails.json +0 -6
- 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
|
-
<
|
|
212
|
-
<
|
|
213
|
-
<
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
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
|
|
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
|
|
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/
|
|
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
|
-
...
|
|
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
|
|
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
|
-
<
|
|
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
|
-
</
|
|
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 '
|
|
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';
|
package/src/components/Shop.js
CHANGED
|
@@ -1,60 +1,53 @@
|
|
|
1
|
-
import
|
|
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
|
-
|
|
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
|
|
41
|
-
import
|
|
42
|
-
import
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
53
|
-
|
|
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
|
-
|
|
81
|
-
|
|
82
|
-
<Route path=
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
<Route path={routes.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
<Route path={routes.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
<Route
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
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={
|
|
120
|
-
categoryQuery={
|
|
121
|
-
pageQuery={
|
|
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 = ({
|
|
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 }
|
|
@@ -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
|
-
|
|
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 {
|
package/cypress/constants.js
DELETED
|
@@ -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
|
-
});
|