From 9453ef17675da4ed7061fc2439215176a3a20f09 Mon Sep 17 00:00:00 2001 From: Maciej Wolowski <103260041+MaciejWolowski@users.noreply.github.com> Date: Thu, 31 Aug 2023 13:17:36 +0200 Subject: [PATCH 01/30] feat: add some tests and fix others (#118) feat: adding tests for new pages added tests for new pages changed some configuration for cypress add visitandhydrate method --- apps/web/__tests__/fixtures/account.json | 6 +++ apps/web/__tests__/support/commands.ts | 25 +++++++++- apps/web/__tests__/support/e2e.ts | 1 + .../support/pageObjects/HomePageObject.ts | 2 +- .../support/pageObjects/LoginPageObject.ts | 30 ++++++++++++ .../support/pageObjects/PasswordPageObject.ts | 48 +++++++++++++++++++ .../pageObjects/ProductDetailPageObject.ts | 2 +- .../support/pageObjects/SignupPageObject.ts | 16 +++++++ apps/web/__tests__/test/smoke/cartPage.cy.ts | 6 +-- .../__tests__/test/smoke/checkoutPage.cy.ts | 17 ++----- apps/web/__tests__/test/smoke/homePage.cy.ts | 11 +++-- apps/web/__tests__/test/smoke/loginPage.cy.ts | 29 +++++++++++ .../__tests__/test/smoke/passwordPage.cy.ts | 26 ++++++++++ .../web/__tests__/test/smoke/signupPage.cy.ts | 12 +++++ apps/web/__tests__/tsconfig.json | 2 +- apps/web/app.vue | 8 +++- .../RenderContentProductSlider.vue | 8 +++- apps/web/cypress.config.ts | 4 ++ apps/web/layouts/default.vue | 17 ++++++- apps/web/package.json | 6 ++- apps/web/pages/login.vue | 4 +- apps/web/pages/reset-password-success.vue | 11 +++-- apps/web/pages/signup.vue | 1 + package.json | 5 +- turbo.json | 19 ++++++-- yarn.lock | 25 +++++++++- 26 files changed, 297 insertions(+), 44 deletions(-) create mode 100644 apps/web/__tests__/fixtures/account.json create mode 100644 apps/web/__tests__/support/pageObjects/LoginPageObject.ts create mode 100644 apps/web/__tests__/support/pageObjects/PasswordPageObject.ts create mode 100644 apps/web/__tests__/support/pageObjects/SignupPageObject.ts create mode 100644 apps/web/__tests__/test/smoke/loginPage.cy.ts create mode 100644 apps/web/__tests__/test/smoke/passwordPage.cy.ts create mode 100644 apps/web/__tests__/test/smoke/signupPage.cy.ts diff --git a/apps/web/__tests__/fixtures/account.json b/apps/web/__tests__/fixtures/account.json new file mode 100644 index 000000000..bb701946f --- /dev/null +++ b/apps/web/__tests__/fixtures/account.json @@ -0,0 +1,6 @@ +{ + "firstname" : "Hieronim", + "lastname" : "VsF", + "email": "tester@vuestorefront.io", + "password": "Stronpassword123!" +} diff --git a/apps/web/__tests__/support/commands.ts b/apps/web/__tests__/support/commands.ts index dc4767d9b..0b0029b31 100644 --- a/apps/web/__tests__/support/commands.ts +++ b/apps/web/__tests__/support/commands.ts @@ -7,11 +7,14 @@ declare global { getFixture(id: string): Chainable; getByComponent(id: string): Chainable; waitUntilElementInDOM(id: () => Cypress.Chainable): Chainable; + visit(url: string, options?: Partial): Cypress.Chainable | null; + visitAndHydrate(options: Partial & { url: string }): Cypress.Chainable | null; + visitAndHydrate(url: string, options?: Partial): Cypress.Chainable | null; + clearServiceWorkers(): Cypress.Chainable | null; } } } - Cypress.Commands.add('getByTestId', (testId: string) => { cy.get(`[data-testid="${testId}"]`); }); @@ -24,7 +27,7 @@ Cypress.Commands.add('getFixture', (fixtureName: string) => { return cy.fixture(`../fixtures/${fixtureName}.json`).then((fixture) => { return fixture; }); -}) +}); Cypress.Commands.add('waitUntilElementInDOM', (actionToWaitOn: () => Cypress.Chainable) => cy.waitUntil(() => @@ -34,3 +37,21 @@ Cypress.Commands.add('waitUntilElementInDOM', (actionToWaitOn: () => Cypress.Cha ), ); +Cypress.Commands.add('clearServiceWorkers', () => { + // Fix for stuck visit even though page is loaded in cypress + if (window.navigator && navigator.serviceWorker) { + const registrationPromise = window.navigator.serviceWorker.getRegistrations().then((registrations) => + registrations.forEach((registration) => { + registration.unregister(); + }), + ); + return cy.wrap(registrationPromise); + } +}); + +Cypress.Commands.add('visitAndHydrate', (url, options) => { + cy.clearServiceWorkers(); + cy.visit(url, options); + // Wait until app is hydrated + cy.get('body.hydrated'); +}); diff --git a/apps/web/__tests__/support/e2e.ts b/apps/web/__tests__/support/e2e.ts index 1221b17e0..50d5c0ce4 100644 --- a/apps/web/__tests__/support/e2e.ts +++ b/apps/web/__tests__/support/e2e.ts @@ -1 +1,2 @@ +import 'cypress-real-events'; import './commands'; diff --git a/apps/web/__tests__/support/pageObjects/HomePageObject.ts b/apps/web/__tests__/support/pageObjects/HomePageObject.ts index 9c32686e6..a77464c0c 100644 --- a/apps/web/__tests__/support/pageObjects/HomePageObject.ts +++ b/apps/web/__tests__/support/pageObjects/HomePageObject.ts @@ -16,7 +16,7 @@ export class HomePageObject { } get banners() { - return cy.getByComponent('Display'); + return cy.getByTestId('display'); } get productCard() { diff --git a/apps/web/__tests__/support/pageObjects/LoginPageObject.ts b/apps/web/__tests__/support/pageObjects/LoginPageObject.ts new file mode 100644 index 000000000..765256b40 --- /dev/null +++ b/apps/web/__tests__/support/pageObjects/LoginPageObject.ts @@ -0,0 +1,30 @@ +export class LoginPageObject { + clickForgotPasswordLink() { + cy.getByTestId('login-page-reset-button').click(); + return this; + } + + successLogin() { + cy.getFixture('account').then((fixture) => { + cy.get(`[type="email"]`).type(fixture.email, { delay: 0 }); + cy.get(`[type="password"]`).type(fixture.password, { delay: 0 }); + }); + cy.getByTestId('checkbox').realHover().click(); + cy.get(`[type="submit"]`).click(); + cy.contains('Sneaker hot drops').should('exist'); + } + + clickSignUpLink() { + cy.getByTestId('login-page-signup-button').click(); + return this; + } + clickLoginLink() { + cy.getByTestId('signup-page-login-button').click(); + return this; + } + + isURL(path: string) { + cy.url().should('contain', path); + return this; + } +} diff --git a/apps/web/__tests__/support/pageObjects/PasswordPageObject.ts b/apps/web/__tests__/support/pageObjects/PasswordPageObject.ts new file mode 100644 index 000000000..86e48414b --- /dev/null +++ b/apps/web/__tests__/support/pageObjects/PasswordPageObject.ts @@ -0,0 +1,48 @@ + +export class PasswordPageObject { + get accountForm() { + return cy.getByTestId('input-field').should('be.visible'); + } + + + backToLogin() { + cy.contains('Reset password').should('be.visible'); + cy.contains('Back to Login').click(); + + return this; + } + + isURL(path: string) { + cy.url().should('contain', path); + + return this; + } + + fillEmail() { + cy.getFixture('account').then((fixture) => { + this.accountForm.type(fixture.email, { delay: 0 }); + }); + + return this; + } + + resetPassword() { + cy.get('[type="submit"]').realClick(); + cy.contains('Reset password'); + cy.getByTestId('reset-password-page-reset-button').realClick(); + + + return this; + } + + setNewPassword() { + cy.getFixture('account').then((fixture) => { + cy.get(`[name="password"]`).type(fixture.password, { delay: 0 }); + cy.get(`[name="repeatedPassword"]`).type(fixture.password, { delay: 0 }); + }); + cy.get('[type="submit"]').realClick(); + + return this; + } + +} diff --git a/apps/web/__tests__/support/pageObjects/ProductDetailPageObject.ts b/apps/web/__tests__/support/pageObjects/ProductDetailPageObject.ts index b9d938c90..506890a02 100644 --- a/apps/web/__tests__/support/pageObjects/ProductDetailPageObject.ts +++ b/apps/web/__tests__/support/pageObjects/ProductDetailPageObject.ts @@ -27,7 +27,7 @@ export class ProductDetailPageObject { displayCheck() { cy.getFixture('products').then((fixture) => { - cy.visit(fixture.url); + cy.visitAndHydrate(fixture.url); this.assertProductDetailPageElements(fixture); }); return this; diff --git a/apps/web/__tests__/support/pageObjects/SignupPageObject.ts b/apps/web/__tests__/support/pageObjects/SignupPageObject.ts new file mode 100644 index 000000000..59ec8c17c --- /dev/null +++ b/apps/web/__tests__/support/pageObjects/SignupPageObject.ts @@ -0,0 +1,16 @@ +export class SignupPageObject { + createAccount() { + cy.getFixture('account').then((fixture) => { + cy.get(`[name="firstName"]`).type(fixture.firstname, { delay: 0 }); + cy.get(`[name="lastName"]`).type(fixture.lastname, { delay: 0 }); + cy.get(`[name="email"]`).type(fixture.email, { delay: 0 }); + cy.get(`[name="password"]`).type(fixture.password, { delay: 0 }); + }); + cy.get('#terms').realHover().click(); + cy.get('#subscription').realHover().click(); + cy.get(`[type="submit"]`).click(); + cy.get('[data-testid="modal"]').should('exist'); + cy.contains('Go Shopping').click(); + cy.contains('Sneaker hot drops').should('exist'); + } +} diff --git a/apps/web/__tests__/test/smoke/cartPage.cy.ts b/apps/web/__tests__/test/smoke/cartPage.cy.ts index fa4cf403a..c22ef46a9 100644 --- a/apps/web/__tests__/test/smoke/cartPage.cy.ts +++ b/apps/web/__tests__/test/smoke/cartPage.cy.ts @@ -1,12 +1,12 @@ +import { paths } from '../../../utils/paths'; import { CartPageObject } from '../../support/pageObjects/CartPageObject'; const cart = new CartPageObject(); describe('Smoke: Cart Page', () => { it('[smoke] Add items to cart and display it', () => { - cy.visit('/'); + cy.visitAndHydrate(paths.home); - cart.openCart() - .checkCart(); + cart.openCart().checkCart(); }); }); diff --git a/apps/web/__tests__/test/smoke/checkoutPage.cy.ts b/apps/web/__tests__/test/smoke/checkoutPage.cy.ts index 143f43d2e..4d1075909 100644 --- a/apps/web/__tests__/test/smoke/checkoutPage.cy.ts +++ b/apps/web/__tests__/test/smoke/checkoutPage.cy.ts @@ -1,3 +1,4 @@ +import { paths } from '../../../utils/paths'; import { CartPageObject } from '../../support/pageObjects/CartPageObject'; import { CheckoutPageObject } from '../../support/pageObjects/CheckoutPageObject'; @@ -6,19 +7,11 @@ const cart = new CartPageObject(); describe('Smoke: Checkout Page', () => { it('[smoke] Display checkout and place order', () => { - cy.visit('/'); + cy.visitAndHydrate(paths.home); cart.openCart(); - checkout - .goToCheckout() - .addContactInformation() - .fillContactInformationForm(); - - //.addBillingAddress() - //.fillBillingAddressForm() - //.addShippingAddress() - //.fillShippingAddressForm() - // .placeOrderButton() - // .displaySuccessPage(); + checkout.goToCheckout().addContactInformation().fillContactInformationForm().addBillingAddress(); + checkout.fillBillingAddressForm().addShippingAddress(); + checkout.fillShippingAddressForm().placeOrderButton().displaySuccessPage(); }); }); diff --git a/apps/web/__tests__/test/smoke/homePage.cy.ts b/apps/web/__tests__/test/smoke/homePage.cy.ts index fbe514e78..b252a2461 100644 --- a/apps/web/__tests__/test/smoke/homePage.cy.ts +++ b/apps/web/__tests__/test/smoke/homePage.cy.ts @@ -1,25 +1,26 @@ +import { paths } from '../../../utils/paths'; import { HomePageObject } from '../../support/pageObjects/HomePageObject'; const homePage = new HomePageObject(); beforeEach(() => { - cy.visit('/'); + cy.visitAndHydrate(paths.home); }); describe('Smoke: Homepage', () => { - it.skip('[smoke] Check if Primary Button is working', () => { + it('[smoke] Check if Primary Button is working', () => { homePage.checkPrimaryButton(); }); - it.skip('[smoke] Check if Secondary Button is working', () => { + it('[smoke] Check if Secondary Button is working', () => { homePage.checkSecondaryButton(); }); - it.skip('[smoke] Check if elements display properly', () => { + it('[smoke] Check if elements display properly', () => { homePage.checkCategoryCard().checkBanners().checkProductCard(); }); - it.skip('[smoke] Check if Categories button is working ', () => { + it('[smoke] Check if Categories button is working ', () => { homePage.checkHeaderCategory(); }); }); diff --git a/apps/web/__tests__/test/smoke/loginPage.cy.ts b/apps/web/__tests__/test/smoke/loginPage.cy.ts new file mode 100644 index 000000000..a436e3b93 --- /dev/null +++ b/apps/web/__tests__/test/smoke/loginPage.cy.ts @@ -0,0 +1,29 @@ +import { paths } from '../../../utils/paths'; +import { LoginPageObject } from '../../support/pageObjects/LoginPageObject'; + +const login = new LoginPageObject(); +describe('Login page check', () => { + it('Checking if forgot password button has correct link', () => { + cy.visitAndHydrate(paths.authLogin); + + login + .clickForgotPasswordLink() + .isURL(paths.authResetPassword); + }); + + it('Checking moving form login to signup and back', () => { + cy.visitAndHydrate(paths.authLogin); + + login + .clickSignUpLink() + .isURL(paths.authSignup) + .clickLoginLink() + .isURL(paths.authLogin); + }); + + it('Checking success login', () => { + cy.visitAndHydrate(paths.authLogin); + + login.successLogin(); + }); +}); diff --git a/apps/web/__tests__/test/smoke/passwordPage.cy.ts b/apps/web/__tests__/test/smoke/passwordPage.cy.ts new file mode 100644 index 000000000..63463887d --- /dev/null +++ b/apps/web/__tests__/test/smoke/passwordPage.cy.ts @@ -0,0 +1,26 @@ +import { paths } from '../../../utils/paths'; +import { PasswordPageObject } from '../../support/pageObjects/PasswordPageObject'; + +const password = new PasswordPageObject(); + +describe('Smoke: Password', () => { + it('Checking if back to login button works', () => { + cy.visitAndHydrate(paths.authResetPassword); + + password + .backToLogin() + .isURL(paths.authLogin) + }); + + it('Reset password check', () => { + cy.visitAndHydrate(paths.authResetPassword); + + password.fillEmail().resetPassword().isURL(paths.authResetPassword); + }); + + it('Checking set new password page', () => { + cy.visitAndHydrate(paths.authSetNewPassword); + + password.isURL(paths.authSetNewPassword).setNewPassword(); + }); +}); diff --git a/apps/web/__tests__/test/smoke/signupPage.cy.ts b/apps/web/__tests__/test/smoke/signupPage.cy.ts new file mode 100644 index 000000000..d82898b30 --- /dev/null +++ b/apps/web/__tests__/test/smoke/signupPage.cy.ts @@ -0,0 +1,12 @@ +import { paths } from '../../../utils/paths'; +import { SignupPageObject } from '../../support/pageObjects/SignupPageObject'; + +const signup = new SignupPageObject(); + +describe('signup testing', () => { + it('create account and go shopping', () => { + cy.visitAndHydrate(paths.authSignup); + + signup.createAccount(); + }); +}); diff --git a/apps/web/__tests__/tsconfig.json b/apps/web/__tests__/tsconfig.json index 4bfd57c03..33ed8a05e 100644 --- a/apps/web/__tests__/tsconfig.json +++ b/apps/web/__tests__/tsconfig.json @@ -2,7 +2,7 @@ "extends": ".././.nuxt/tsconfig.json", "compilerOptions": { "isolatedModules": false, - "types": ["cypress"] + "types": ["cypress", "node", "cypress-real-events"] }, "include": ["**/*.ts", "**/*.tsx", "../cypress.config.ts"] } diff --git a/apps/web/app.vue b/apps/web/app.vue index 197fa8899..b375a570a 100644 --- a/apps/web/app.vue +++ b/apps/web/app.vue @@ -1,5 +1,5 @@ diff --git a/apps/web/pages/signup.vue b/apps/web/pages/signup.vue index 966dc3129..5e5c19baf 100644 --- a/apps/web/pages/signup.vue +++ b/apps/web/pages/signup.vue @@ -7,6 +7,7 @@ :tag="NuxtLink" :to="paths.authLogin" class="focus:outline focus:outline-offset-2 focus:outline-2 outline-secondary-600 rounded" + data-testid="signup-page-login-button" > {{ $t('auth.login.heading') }} diff --git a/package.json b/package.json index 1cfaee1c4..efcdd798f 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,8 @@ "test": "turbo run test", "test:watch": "turbo run test:watch", "test:coverage": "npx turbo run test:coverage", - "test:cypress": "concurrently -k -s=first \"yarn wait-on http://localhost:3000 && turbo run test:cypress\" \"yarn start\"", + "test:cypress": "concurrently -k -s=first \"yarn wait-on http-get://localhost:3000 && turbo run test:cypress\" \"yarn start\"", + "test:cypress-dev": "concurrently -k -s=first \"yarn wait-on http-get://localhost:3000 && turbo run test:cypress-dev\" \"yarn dev\"", "lhci:mobile": "lhci autorun" }, "dependencies": { @@ -36,8 +37,6 @@ "babel-preset-node": "^5.1.1", "commitizen": "^4.2.5", "concurrently": "^8.2.0", - "cypress": "^12.12.0", - "cypress-wait-until": "^2.0.0", "eslint": "^8.38.0", "husky": "^7.0.4", "is-ci": "^1.0.0", diff --git a/turbo.json b/turbo.json index 5003be4f1..67642f024 100644 --- a/turbo.json +++ b/turbo.json @@ -2,13 +2,21 @@ "$schema": "https://turborepo.org/schema.json", "pipeline": { "build": { - "dependsOn": ["^build"], - "outputs": ["dist/**"], + "dependsOn": [ + "^build" + ], + "outputs": [ + "dist/**" + ], "cache": false }, "build:analyze": { - "dependsOn": ["^build"], - "outputs": ["dist/**"], + "dependsOn": [ + "^build" + ], + "outputs": [ + "dist/**" + ], "cache": false }, "start": { @@ -35,6 +43,9 @@ }, "test:cypress": { "cache": false + }, + "test:cypress-dev": { + "cache": false } } } diff --git a/yarn.lock b/yarn.lock index 767026f41..2eaafc0ec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4754,8 +4754,6 @@ __metadata: commitizen: ^4.2.5 concurrently: ^8.2.0 cross-env: ^7.0.3 - cypress: ^12.12.0 - cypress-wait-until: ^2.0.0 dotenv: ^16.0.3 eslint: ^8.38.0 husky: ^7.0.4 @@ -7777,6 +7775,17 @@ __metadata: languageName: node linkType: hard +"cypress-real-events@npm:^1.10.0": + version: 1.10.0 + resolution: "cypress-real-events@npm:1.10.0" + dependencies: + prettier: ^3.0.0 + peerDependencies: + cypress: ^4.x || ^5.x || ^6.x || ^7.x || ^8.x || ^9.x || ^10.x || ^11.x || ^12.x + checksum: 917cf0458f0073452462bd1468ea3e9d77382c0c7991555314cec9e1e39a82668f8185e6fbbd4e0303576ddf3cbe410fcdb1dec8237f68e1ef18d05e41d7d537 + languageName: node + linkType: hard + "cypress-wait-until@npm:^2.0.0": version: 2.0.1 resolution: "cypress-wait-until@npm:2.0.1" @@ -15178,6 +15187,15 @@ __metadata: languageName: node linkType: hard +"prettier@npm:^3.0.0": + version: 3.0.2 + resolution: "prettier@npm:3.0.2" + bin: + prettier: bin/prettier.cjs + checksum: 118b59ddb6c80abe2315ab6d0f4dd1b253be5cfdb20622fa5b65bb1573dcd362e6dd3dcf2711dd3ebfe64aecf7bdc75de8a69dc2422dcd35bdde7610586b677a + languageName: node + linkType: hard + "pretty-bytes@npm:^5.3.0, pretty-bytes@npm:^5.6.0": version: 5.6.0 resolution: "pretty-bytes@npm:5.6.0" @@ -19113,6 +19131,9 @@ __metadata: "@vue-storefront/unified-data-model": ^0.6.0 "@vue/test-utils": ^2.4.0 "@vueuse/core": ^10.3.0 + cypress: ^12.12.0 + cypress-real-events: ^1.10.0 + cypress-wait-until: ^2.0.0 happy-dom: ^9.20.3 lodash-es: ^4.17.21 nuxt: ^3.6.5 From f89ea96a7a3fe6f9ddf6f9652be56af40207c63f Mon Sep 17 00:00:00 2001 From: Maciej Wolowski <103260041+MaciejWolowski@users.noreply.github.com> Date: Thu, 31 Aug 2023 13:37:39 +0200 Subject: [PATCH 02/30] feat: fix productlist tests [SV-207] (#132) * feat: adding tests for new pages added tests for new pages changed some configuration for cypress add visitandhydrate method * feat: update product list tests --- apps/web/__tests__/test/smoke/productListPage.cy.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/web/__tests__/test/smoke/productListPage.cy.ts b/apps/web/__tests__/test/smoke/productListPage.cy.ts index 6e98781d9..6c22bae2e 100644 --- a/apps/web/__tests__/test/smoke/productListPage.cy.ts +++ b/apps/web/__tests__/test/smoke/productListPage.cy.ts @@ -1,26 +1,27 @@ +import { paths } from '../../../utils/paths'; import { ProductListPageObject } from '../../support/pageObjects/ProductListPageObject'; const productListPage = new ProductListPageObject(); beforeEach(() => { - cy.visit('/category'); + cy.visitAndHydrate(paths.category); }); describe('Smoke: Product List Page', function () { context('Displaying products and categories', () => { - it.skip('[smoke] User should be able to see the products as list and grid', () => { + it('[smoke] User should be able to see the products as list and grid', () => { // ASSERT - list view can be as grid view productListPage.assertGridView(); }); - it.skip('[smoke] User should be able to see the list of the categories available', () => { + it('[smoke] User should be able to see the list of the categories available', () => { // ASSERT - productListPage.openFirstCategory(); }); }); context('Product details and actions', () => { - it.skip('[smoke] User should see the product information', () => { + it('[smoke] User should see the product information', () => { // ASSERT - product details are displayed productListPage.assertProductListElements().assertFirstProduct(); }); From be7b1b40b0252716a670275543f532c365c70b42 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 16:21:28 +0200 Subject: [PATCH 03/30] chore(deps): :arrow_up: Update definitelyTyped (#134) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2eaafc0ec..e72c53773 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4171,11 +4171,11 @@ __metadata: linkType: hard "@types/lodash-es@npm:^4.17.7": - version: 4.17.8 - resolution: "@types/lodash-es@npm:4.17.8" + version: 4.17.9 + resolution: "@types/lodash-es@npm:4.17.9" dependencies: "@types/lodash": "*" - checksum: 36356169a1862e2a1b09cde3b11b3790ab2c2e477778d70f825b216479ea93bd1a960767dbefcd00d6604312170a1b15209f0fa1c35ddf8861bc233c9b0d3e56 + checksum: a2c7ab8da13892f89ab86b61dd9a0125c767b9db7b9bdaac7fd8508c9fa884bbb19a9760dbdc1e7e698e3322b7a8ba03daa80832371da32a8bd42da0920be838 languageName: node linkType: hard @@ -4208,9 +4208,9 @@ __metadata: linkType: hard "@types/node@npm:*": - version: 20.5.7 - resolution: "@types/node@npm:20.5.7" - checksum: fc284c8e16ddc04569730d58e87eae349eb1c3dd9020cb79a1862d9d9add6f04e7367a236f3252db8db2572f90278e250f4cd43d27d264972b54394eaba1ed76 + version: 20.5.9 + resolution: "@types/node@npm:20.5.9" + checksum: 717490e94131722144878b4ca1a963ede1673bb8f2ef78c2f5b50b918df6dc9b35e7f8283e5c2a7a9f137730f7c08dc6228e53d4494a94c9ee16881e6ce6caed languageName: node linkType: hard @@ -4222,16 +4222,16 @@ __metadata: linkType: hard "@types/node@npm:^16.18.39": - version: 16.18.46 - resolution: "@types/node@npm:16.18.46" - checksum: 1aed3fe9693f2098b8dac8c76c809c1925a456da00dd6f06c1ccb55c62ccfbbe7ec43ccfd12001f9cb4ff84e138292ae53456435dfecd5c4bb1324394c3e09c7 + version: 16.18.48 + resolution: "@types/node@npm:16.18.48" + checksum: 5b725fe918197e4395cc88de17d67efeb02436e29c0d3b212ed63dfc51509ed398e9155ae15d1a8cd6f1c891463f2cf074dcea320d8cd392e25a9a11ce53dd6c languageName: node linkType: hard "@types/node@npm:^18": - version: 18.17.12 - resolution: "@types/node@npm:18.17.12" - checksum: 79f8bcca3067a3c529f30e172df8d14f25ab9e4cd6a05ed897a924ab1dec774e8ea172ef5c4a67ffec433d423a0c81778f17db22606d574bc83871b60aab298e + version: 18.17.14 + resolution: "@types/node@npm:18.17.14" + checksum: f96ce1e588426a26cf82440193084f8bbab47bfb3c2e668cf174095f99ce808a20654b2137448c7e88cfd7b6c2b8521ffb6f714f521b3502ac595a0df0bff679 languageName: node linkType: hard From d58be430a2a41668fdbef0cebdbcf34e21b9c12b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 18:43:22 +0200 Subject: [PATCH 04/30] chore(deps): :arrow_up: Update devDependency eslint to v8.49.0 (#138) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/yarn.lock b/yarn.lock index e72c53773..64d29ab6a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2524,10 +2524,10 @@ __metadata: languageName: node linkType: hard -"@eslint/js@npm:8.48.0": - version: 8.48.0 - resolution: "@eslint/js@npm:8.48.0" - checksum: b2755f9c0ee810c886eba3c50dcacb184ba5a5cd1cbc01988ee506ad7340653cae0bd55f1d95c64b56dfc6d25c2caa7825335ffd2c50165bae9996fe0f396851 +"@eslint/js@npm:8.49.0": + version: 8.49.0 + resolution: "@eslint/js@npm:8.49.0" + checksum: a6601807c8aeeefe866926ad92ed98007c034a735af20ff709009e39ad1337474243d47908500a3bde04e37bfba16bcf1d3452417f962e1345bc8756edd6b830 languageName: node linkType: hard @@ -2586,14 +2586,14 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.11.10": - version: 0.11.10 - resolution: "@humanwhocodes/config-array@npm:0.11.10" +"@humanwhocodes/config-array@npm:^0.11.11": + version: 0.11.11 + resolution: "@humanwhocodes/config-array@npm:0.11.11" dependencies: "@humanwhocodes/object-schema": ^1.2.1 debug: ^4.1.1 minimatch: ^3.0.5 - checksum: 1b1302e2403d0e35bc43e66d67a2b36b0ad1119efc704b5faff68c41f791a052355b010fb2d27ef022670f550de24cd6d08d5ecf0821c16326b7dcd0ee5d5d8a + checksum: db84507375ab77b8ffdd24f498a5b49ad6b64391d30dd2ac56885501d03964d29637e05b1ed5aefa09d57ac667e28028bc22d2da872bfcd619652fbdb5f4ca19 languageName: node linkType: hard @@ -9184,14 +9184,14 @@ __metadata: linkType: hard "eslint@npm:^8.38.0": - version: 8.48.0 - resolution: "eslint@npm:8.48.0" + version: 8.49.0 + resolution: "eslint@npm:8.49.0" dependencies: "@eslint-community/eslint-utils": ^4.2.0 "@eslint-community/regexpp": ^4.6.1 "@eslint/eslintrc": ^2.1.2 - "@eslint/js": 8.48.0 - "@humanwhocodes/config-array": ^0.11.10 + "@eslint/js": 8.49.0 + "@humanwhocodes/config-array": ^0.11.11 "@humanwhocodes/module-importer": ^1.0.1 "@nodelib/fs.walk": ^1.2.8 ajv: ^6.12.4 @@ -9226,7 +9226,7 @@ __metadata: text-table: ^0.2.0 bin: eslint: bin/eslint.js - checksum: f20b359a4f8123fec5c033577368cc020d42978b1b45303974acd8da7a27063168ee3fe297ab5b35327162f6a93154063e3ce6577102f70f9809aff793db9bd0 + checksum: 4dfe257e1e42da2f9da872b05aaaf99b0f5aa022c1a91eee8f2af1ab72651b596366320c575ccd4e0469f7b4c97aff5bb85ae3323ebd6a293c3faef4028b0d81 languageName: node linkType: hard From e5368c2f475be33f1cb9d2d7fcd1c450797b71db Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 19:46:12 +0200 Subject: [PATCH 05/30] chore(deps): :arrow_up: Update devDependency @types/node to v18.17.15 (#137) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/yarn.lock b/yarn.lock index 64d29ab6a..83aabb261 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4208,9 +4208,9 @@ __metadata: linkType: hard "@types/node@npm:*": - version: 20.5.9 - resolution: "@types/node@npm:20.5.9" - checksum: 717490e94131722144878b4ca1a963ede1673bb8f2ef78c2f5b50b918df6dc9b35e7f8283e5c2a7a9f137730f7c08dc6228e53d4494a94c9ee16881e6ce6caed + version: 20.6.0 + resolution: "@types/node@npm:20.6.0" + checksum: 52611801af5cf151c6fac1963aa4a8a8ca2e388a9e9ed82b01b70bca762088ded5b32cc789c5564220d5d7dccba2b8dd34446a3d4fc74736805e1f2cf262e29d languageName: node linkType: hard @@ -4222,16 +4222,16 @@ __metadata: linkType: hard "@types/node@npm:^16.18.39": - version: 16.18.48 - resolution: "@types/node@npm:16.18.48" - checksum: 5b725fe918197e4395cc88de17d67efeb02436e29c0d3b212ed63dfc51509ed398e9155ae15d1a8cd6f1c891463f2cf074dcea320d8cd392e25a9a11ce53dd6c + version: 16.18.50 + resolution: "@types/node@npm:16.18.50" + checksum: 8aec1eaf83407197ec2fe947182c238f49b82a7aace867cee1f81f72eb8a76c3c8b2adb1fd356e7443317cffb2546708da8934299a579edd25e3160bf7af30a1 languageName: node linkType: hard "@types/node@npm:^18": - version: 18.17.14 - resolution: "@types/node@npm:18.17.14" - checksum: f96ce1e588426a26cf82440193084f8bbab47bfb3c2e668cf174095f99ce808a20654b2137448c7e88cfd7b6c2b8521ffb6f714f521b3502ac595a0df0bff679 + version: 18.17.15 + resolution: "@types/node@npm:18.17.15" + checksum: eed11d4398ccdb999a4c65658ee75de621a4ad57aece48ed2fb8803b1e2711fadf58d8aefbdb0a447d69cf3cba602ca32fe0fc92077575950a796e1dc13baa0f languageName: node linkType: hard From ce7b59bbada9db568213e69d28ee587a42b2ff2d Mon Sep 17 00:00:00 2001 From: Maciej Wolowski <103260041+MaciejWolowski@users.noreply.github.com> Date: Tue, 12 Sep 2023 09:40:52 +0200 Subject: [PATCH 06/30] feat: add tests for my account page [SV-208] (#131) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add tests for my account page * feat: testing solution * Update apps/web/__tests__/support/pageObjects/MyAccountPageObject.ts Co-authored-by: Szymon Dziewoński * feat: added 2 lines for my account test * feat: test fix for test * feat: test fix --------- Co-authored-by: Szymon Dziewoński --- .../pageObjects/MyAccountPageObject.ts | 73 +++++++++++++++++++ .../__tests__/test/smoke/myAccountPage.cy.ts | 24 ++++++ 2 files changed, 97 insertions(+) create mode 100644 apps/web/__tests__/support/pageObjects/MyAccountPageObject.ts create mode 100644 apps/web/__tests__/test/smoke/myAccountPage.cy.ts diff --git a/apps/web/__tests__/support/pageObjects/MyAccountPageObject.ts b/apps/web/__tests__/support/pageObjects/MyAccountPageObject.ts new file mode 100644 index 000000000..d6ccb5187 --- /dev/null +++ b/apps/web/__tests__/support/pageObjects/MyAccountPageObject.ts @@ -0,0 +1,73 @@ +import { paths } from "../../../utils/paths"; + +export class MyAccountPageObject { + get accountDropdownListItem () { + return cy.get(`a[href="${paths.account}"]`) + //cy.getByTestId('account-dropdown-list-item'); + } + + clickTopBarMyAccountLink() { + cy.getByTestId('account-dropdown-button').should('exist').focus().click(); + + this.accountDropdownListItem + .should('exist') + .contains('My Account').click(); + + cy.url().should('contain', paths.account); + } + + checkAllSections() { + cy.contains('Account Settings').should('exist'); + cy.contains('Personal Data').should('exist'); + cy.contains('Billing Details').should('exist'); + cy.contains('Shipping Details').should('exist'); + cy.contains('Orders & Returns').should('exist'); + cy.contains('My Orders').should('exist'); + cy.contains('Returns').should('exist'); + cy.contains('Logout').should('exist'); + + return this; + } + + personalDataSection() { + cy.get('a').contains('Personal Data').click(); + cy.url().should('contain', paths.accountPersonalData); + cy.contains('Your name').should('exist'); + cy.contains('Contact information').should('exist'); + cy.contains('Your password').should('exist'); + + return this; + } + + billingDetailsSection() { + cy.get('a').contains('Billing Details').click(); + cy.url().should('contain', paths.accountBillingDetails); + cy.contains('Billing address').should('exist'); + + return this; + } + + shippingDetailsSection() { + cy.get('a').contains('Shipping Details').click(); + cy.url().should('contain', paths.accountShippingDetails); + cy.contains('Shipping address').should('exist'); + + return this; + } + + myOrdersSection() { + cy.get('a').contains('My Orders').click(); + cy.url().should('contain', paths.accountMyOrders); + cy.contains("Details").should('exist'); + + return this; + } + + returnsSection() { + cy.get('a').contains('Returns').click(); + cy.url().should('contain', paths.accountReturns); + cy.contains("You haven’t shopped with us yet").should('exist'); + + return this; + } +} diff --git a/apps/web/__tests__/test/smoke/myAccountPage.cy.ts b/apps/web/__tests__/test/smoke/myAccountPage.cy.ts new file mode 100644 index 000000000..80867bc98 --- /dev/null +++ b/apps/web/__tests__/test/smoke/myAccountPage.cy.ts @@ -0,0 +1,24 @@ +import { paths } from '../../../utils/paths'; +import { MyAccountPageObject } from '../../support/pageObjects/MyAccountPageObject'; + +const myAccount = new MyAccountPageObject(); + +describe('my account', () => { + it('going to my account from header', () => { + cy.visitAndHydrate(paths.home); + + myAccount.clickTopBarMyAccountLink(); + }); + + it('checking my account section', () => { + cy.visitAndHydrate(paths.account); + + myAccount + .checkAllSections() + .personalDataSection() + .billingDetailsSection() + .shippingDetailsSection() + .myOrdersSection() + .returnsSection(); + }); +}); From 74254f1929ff3ed8b33ad7673222887a7cc6cb43 Mon Sep 17 00:00:00 2001 From: daaf <44862757+dawid-ziobro@users.noreply.github.com> Date: Wed, 13 Sep 2023 11:46:14 +0200 Subject: [PATCH 07/30] fix: remove logout button on my account page for larger devices (#139) --- apps/web/layouts/account.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/layouts/account.vue b/apps/web/layouts/account.vue index 410be2b23..11a5d8d57 100644 --- a/apps/web/layouts/account.vue +++ b/apps/web/layouts/account.vue @@ -35,7 +35,7 @@ { hidden: !isRoot }, ]" > -
    +
      {{ title }} @@ -57,8 +57,8 @@
    - -
      + +
        Date: Wed, 13 Sep 2023 12:57:03 +0200 Subject: [PATCH 08/30] chore: update sonarcloud ci (#140) --- .github/workflows/code-quality.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/code-quality.yaml b/.github/workflows/code-quality.yaml index efc43aadf..e073cf067 100644 --- a/.github/workflows/code-quality.yaml +++ b/.github/workflows/code-quality.yaml @@ -9,24 +9,24 @@ jobs: sonarcloud-server: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: SonarCloud Scan - uses: SonarSource/sonarcloud-github-action@v1.9.1 + uses: SonarSource/sonarcloud-github-action@v2.0.2 with: projectBaseDir: apps/server env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_SERVER }} sonarcloud-web: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Setup node uses: actions/setup-node@v3 @@ -36,11 +36,11 @@ jobs: - name: Install dependencies run: yarn --frozen-lockfile - + - name: SonarCloud Scan - uses: SonarSource/sonarcloud-github-action@v1.9.1 + uses: SonarSource/sonarcloud-github-action@v2.0.2 with: projectBaseDir: apps/web env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_WEB }} From 4b6504e1a7a710c76576d5b7f4a2546c975d8f14 Mon Sep 17 00:00:00 2001 From: daaf <44862757+dawid-ziobro@users.noreply.github.com> Date: Thu, 14 Sep 2023 13:29:01 +0200 Subject: [PATCH 09/30] feat: add useBreadcrumbs composable (#142) --- .../CategoryPageContent.vue | 33 +++++++------------ apps/web/composables/useBreakpoints/index.ts | 1 + .../useBreakpoints/useBreakpoints.ts | 27 +++++++++++++++ .../__tests__/useProductReviews.spec.ts | 4 +-- apps/web/layouts/account.vue | 5 ++- apps/web/utils/mediaQueries.ts | 4 --- 6 files changed, 43 insertions(+), 31 deletions(-) create mode 100644 apps/web/composables/useBreakpoints/index.ts create mode 100644 apps/web/composables/useBreakpoints/useBreakpoints.ts delete mode 100644 apps/web/utils/mediaQueries.ts diff --git a/apps/web/components/CategoryPageContent/CategoryPageContent.vue b/apps/web/components/CategoryPageContent/CategoryPageContent.vue index 663507be0..0496af46a 100644 --- a/apps/web/components/CategoryPageContent/CategoryPageContent.vue +++ b/apps/web/components/CategoryPageContent/CategoryPageContent.vue @@ -43,15 +43,13 @@ - - - + @@ -60,7 +58,7 @@ diff --git a/apps/web/composables/useBreakpoints/index.ts b/apps/web/composables/useBreakpoints/index.ts new file mode 100644 index 000000000..a99ce88d4 --- /dev/null +++ b/apps/web/composables/useBreakpoints/index.ts @@ -0,0 +1 @@ +export * from './useBreakpoints'; diff --git a/apps/web/composables/useBreakpoints/useBreakpoints.ts b/apps/web/composables/useBreakpoints/useBreakpoints.ts new file mode 100644 index 000000000..45a99d0fd --- /dev/null +++ b/apps/web/composables/useBreakpoints/useBreakpoints.ts @@ -0,0 +1,27 @@ +import { createSharedComposable, syncRefs, useBreakpoints as useBreakpointsVueUse } from '@vueuse/core'; + +/** + * @description Composable that prepares breakpoints-dependent refs + * @returns {@link ReturnType} + * @example + * const { isTablet, isDesktop } = useBreakpoints(); + */ +export const useBreakpoints = createSharedComposable(() => { + const breakpoints = useBreakpointsVueUse({ + tablet: '768px', + desktop: '1024px', + }); + + const isTablet = ref(true); + const isDesktop = ref(false); + + onMounted(() => { + syncRefs(breakpoints.greaterOrEqual('tablet'), isTablet); + syncRefs(breakpoints.greaterOrEqual('desktop'), isDesktop); + }); + + return { + isTablet, + isDesktop, + }; +}); diff --git a/apps/web/composables/useProductReviews/__tests__/useProductReviews.spec.ts b/apps/web/composables/useProductReviews/__tests__/useProductReviews.spec.ts index 33a63ce14..6a4ff9dd6 100644 --- a/apps/web/composables/useProductReviews/__tests__/useProductReviews.spec.ts +++ b/apps/web/composables/useProductReviews/__tests__/useProductReviews.spec.ts @@ -3,11 +3,11 @@ import { useProductReviews } from '~/composables/useProductReviews'; import { mockProductReviews } from './productReviews.mock'; vi.mock('~/sdk', () => ({ - sdk: { + useSdk: () => ({ commerce: { getProductReviews: vi.fn(() => mockProductReviews), }, - }, + }), })); describe('useProductReview', () => { diff --git a/apps/web/layouts/account.vue b/apps/web/layouts/account.vue index 11a5d8d57..0fae199d3 100644 --- a/apps/web/layouts/account.vue +++ b/apps/web/layouts/account.vue @@ -3,7 +3,7 @@

        {{ $t('account.heading') }} @@ -86,10 +86,9 @@ diff --git a/apps/web/components/AddressForm/types.ts b/apps/web/components/AddressForm/types.ts index 4c61a53e3..efbb3e279 100644 --- a/apps/web/components/AddressForm/types.ts +++ b/apps/web/components/AddressForm/types.ts @@ -1,4 +1,4 @@ -import { Maybe, SfAddress } from '@vue-storefront/unified-data-model'; +import type { Maybe, SfAddress } from '@vue-storefront/unified-data-model'; export type AddressFormProps = { type: 'billingAddress' | 'shippingAddress'; diff --git a/apps/web/components/CartPageContent/CartPageContent.vue b/apps/web/components/CartPageContent/CartPageContent.vue index 2c2d1acb4..defa81e2c 100644 --- a/apps/web/components/CartPageContent/CartPageContent.vue +++ b/apps/web/components/CartPageContent/CartPageContent.vue @@ -28,7 +28,7 @@

        - diff --git a/apps/web/components/CheckoutAddress/CheckoutAddress.vue b/apps/web/components/CheckoutAddress/CheckoutAddress.vue index ba79f55c4..427cf9464 100644 --- a/apps/web/components/CheckoutAddress/CheckoutAddress.vue +++ b/apps/web/components/CheckoutAddress/CheckoutAddress.vue @@ -40,9 +40,9 @@ - diff --git a/apps/web/components/ProductProperties/ProductProperties.vue b/apps/web/components/ProductProperties/ProductProperties.vue index 909e12d6b..93fa29c9a 100644 --- a/apps/web/components/ProductProperties/ProductProperties.vue +++ b/apps/web/components/ProductProperties/ProductProperties.vue @@ -41,8 +41,8 @@ import { SfChip, SfThumbnail } from '@storefront-ui/vue'; import { ProductPropertiesProps } from '~/components/ProductProperties/types'; const props = defineProps(); -const { getAttributeList, getAttribute, setAttribute } = useProductAttribute(props.product, ['color', 'size']); +const { getAttributeList, getAttribute, setAttribute } = useProductAttribute(props.product, ['color', 'size']); const sizes = getAttributeList('size'); const colors = getAttributeList('color'); const selectedSize = computed(() => getAttribute('size')); diff --git a/apps/web/components/ProductProperties/types.ts b/apps/web/components/ProductProperties/types.ts index 13cafa01a..68c87eb6c 100644 --- a/apps/web/components/ProductProperties/types.ts +++ b/apps/web/components/ProductProperties/types.ts @@ -1,4 +1,4 @@ -import { SfProduct } from '@vue-storefront/unified-data-model'; +import type { SfProduct } from '@vue-storefront/unified-data-model'; export type ProductPropertiesProps = { product: SfProduct; diff --git a/apps/web/components/RenderContent/RenderContent.vue b/apps/web/components/RenderContent/RenderContent.vue index 9cadafd5c..251e4ffdb 100644 --- a/apps/web/components/RenderContent/RenderContent.vue +++ b/apps/web/components/RenderContent/RenderContent.vue @@ -17,6 +17,8 @@ import CategoryCard from '~/components/ui/CategoryCard/CategoryCard.vue'; import Display from '~/components/ui/Display/Display.vue'; import Hero from '~/components/ui/Hero/Hero.vue'; +defineProps(); + const componentsMap = computed(() => ({ Hero, Card: CategoryCard, @@ -24,6 +26,4 @@ const componentsMap = computed(() => ({ Display, ProductSlider: RenderContentProductSlider, })); - -defineProps(); diff --git a/apps/web/components/ShippingMethod/ShippingMethod.vue b/apps/web/components/ShippingMethod/ShippingMethod.vue index 217e6d362..ea099e732 100644 --- a/apps/web/components/ShippingMethod/ShippingMethod.vue +++ b/apps/web/components/ShippingMethod/ShippingMethod.vue @@ -30,12 +30,13 @@ - diff --git a/apps/web/components/ShippingMethod/types.ts b/apps/web/components/ShippingMethod/types.ts index ca9f1bd7b..82da38927 100644 --- a/apps/web/components/ShippingMethod/types.ts +++ b/apps/web/components/ShippingMethod/types.ts @@ -1,4 +1,4 @@ -import { SfShippingMethods, Maybe } from '@vue-storefront/unified-data-model'; +import type { SfShippingMethods, Maybe } from '@vue-storefront/unified-data-model'; export type ShippingMethodProps = { shippingMethods: Maybe; diff --git a/apps/web/components/ui/AccordionItem/AccordionItem.vue b/apps/web/components/ui/AccordionItem/AccordionItem.vue index 0cf2763b1..0ff8ccf04 100644 --- a/apps/web/components/ui/AccordionItem/AccordionItem.vue +++ b/apps/web/components/ui/AccordionItem/AccordionItem.vue @@ -12,7 +12,7 @@ - diff --git a/apps/web/components/ui/ProductCardHorizontal/types.ts b/apps/web/components/ui/ProductCardHorizontal/types.ts index c3197d2e0..336831899 100644 --- a/apps/web/components/ui/ProductCardHorizontal/types.ts +++ b/apps/web/components/ui/ProductCardHorizontal/types.ts @@ -1,4 +1,4 @@ -import { SfProduct } from '@vue-storefront/unified-data-model'; +import type { SfProduct } from '@vue-storefront/unified-data-model'; export type ProductHorizontalProps = { product: Omit< diff --git a/apps/web/components/ui/PurchaseCard/PurchaseCard.vue b/apps/web/components/ui/PurchaseCard/PurchaseCard.vue index 0c57565ff..8aaefe199 100644 --- a/apps/web/components/ui/PurchaseCard/PurchaseCard.vue +++ b/apps/web/components/ui/PurchaseCard/PurchaseCard.vue @@ -33,7 +33,7 @@
        - + @@ -41,13 +41,13 @@
        - + {{ $t('compare') }} - + {{ $t('addToList') }} @@ -86,7 +86,7 @@ - diff --git a/apps/web/layouts/default.vue b/apps/web/layouts/default.vue index 4a935340b..a04f0b24e 100644 --- a/apps/web/layouts/default.vue +++ b/apps/web/layouts/default.vue @@ -2,7 +2,6 @@