diff --git a/apps/web/__tests__/support/failOnError.ts b/apps/web/__tests__/support/failOnError.ts
index c8230ec5d..f5e9a1413 100644
--- a/apps/web/__tests__/support/failOnError.ts
+++ b/apps/web/__tests__/support/failOnError.ts
@@ -10,7 +10,7 @@ Cypress.on("window:before:load", (win) => {
})
});
-Cypress.on('uncaught:exception', (err, runnable) => {
+Cypress.on('uncaught:exception', (err) => {
if (ignoreErrors.some(ignore => err.message.includes(ignore) || err.stack?.includes(ignore))) {
return false;
}
diff --git a/apps/web/__tests__/support/pageObjects/CartPageObject.ts b/apps/web/__tests__/support/pageObjects/CartPageObject.ts
index ad13fe194..2c55b3c2a 100644
--- a/apps/web/__tests__/support/pageObjects/CartPageObject.ts
+++ b/apps/web/__tests__/support/pageObjects/CartPageObject.ts
@@ -46,7 +46,7 @@ export class CartPageObject extends PageObject {
}
checkCart() {
- cy.getFixture('products').then((fixture) => {
+ cy.getFixture('products').then(() => {
this.assertCartPreviewElements();
});
}
diff --git a/apps/web/__tests__/support/pageObjects/CategoryObject.ts b/apps/web/__tests__/support/pageObjects/CategoryObject.ts
index 2c060e955..023414981 100644
--- a/apps/web/__tests__/support/pageObjects/CategoryObject.ts
+++ b/apps/web/__tests__/support/pageObjects/CategoryObject.ts
@@ -1,10 +1,14 @@
import { PageObject } from "./PageObject";
export class CategoryPageObject extends PageObject {
- get filterClickShouldReloadCategory() {
+ get categoryFilter() {
+ return cy.getByTestId('category-filter-0');
+ }
+
+ filterClickShouldReloadCategory = () => {
cy.intercept('/plentysystems/getFacet').as('getFacet');
- cy.getByTestId('category-filter-0').first().click();
+
+ this.categoryFilter.first().click();
cy.wait('@getFacet').its('response.statusCode').should('eq', 200)
- return this;
}
}
diff --git a/apps/web/__tests__/support/pageObjects/CookieBarObject.ts b/apps/web/__tests__/support/pageObjects/CookieBarObject.ts
index 91ebd0428..cd259181c 100644
--- a/apps/web/__tests__/support/pageObjects/CookieBarObject.ts
+++ b/apps/web/__tests__/support/pageObjects/CookieBarObject.ts
@@ -21,7 +21,7 @@ export class CookieBarObject extends PageObject {
}
checkExternalScript() {
- return cy.document().then((doc) => {
+ return cy.document().then(() => {
document.head.innerHTML.includes('test-cookie-external-script.js')
})
}
diff --git a/apps/web/__tests__/support/pageObjects/LoginPageObject.ts b/apps/web/__tests__/support/pageObjects/LoginPageObject.ts
deleted file mode 100644
index ce31c00d7..000000000
--- a/apps/web/__tests__/support/pageObjects/LoginPageObject.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import { PageObject } from "./PageObject";
-
-export class LoginPageObject extends PageObject {
- 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
deleted file mode 100644
index ba3f472bb..000000000
--- a/apps/web/__tests__/support/pageObjects/PasswordPageObject.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-import { PageObject } from "./PageObject";
-
-export class PasswordPageObject extends PageObject {
- 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/SignupPageObject.ts b/apps/web/__tests__/support/pageObjects/SignupPageObject.ts
deleted file mode 100644
index 81af7bcfa..000000000
--- a/apps/web/__tests__/support/pageObjects/SignupPageObject.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { PageObject } from "./PageObject";
-
-export class SignupPageObject extends PageObject {
- 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/feature/languageSelect.cy.ts b/apps/web/__tests__/test/feature/languageSelect.cy.ts
index c69263ca5..340c1596e 100644
--- a/apps/web/__tests__/test/feature/languageSelect.cy.ts
+++ b/apps/web/__tests__/test/feature/languageSelect.cy.ts
@@ -66,16 +66,12 @@ describe('Feature: Language Selector', () => {
});
function setMobileState(
- url: string = paths.home,
width: number = 390,
height: number = 844,
- acceptCookie = true
) {
cy.visitAndHydrate(paths.home);
cy.viewport(width, height)
-
- if (acceptCookie) {
- cookieBar.acceptAll();
- }
+
+ cookieBar.acceptAll();
}
});
diff --git a/apps/web/__tests__/test/smoke/categoryPage.cy.ts b/apps/web/__tests__/test/smoke/categoryPage.cy.ts
index 26141f095..4b4064b55 100644
--- a/apps/web/__tests__/test/smoke/categoryPage.cy.ts
+++ b/apps/web/__tests__/test/smoke/categoryPage.cy.ts
@@ -14,7 +14,7 @@ describe('Smoke: Category Page', () => {
// This way we are independet from the language and the url.
cy.visitAndHydrate('/living-room');
- category.filterClickShouldReloadCategory;
+ category.filterClickShouldReloadCategory();
})
it('[smoke] Category should load DE SSR on first visit where there are no browser cookies', () => {
diff --git a/apps/web/__tests__/test/smoke/loginPage.cy.ts b/apps/web/__tests__/test/smoke/loginPage.cy.ts
deleted file mode 100644
index 818a51362..000000000
--- a/apps/web/__tests__/test/smoke/loginPage.cy.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-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
deleted file mode 100644
index c47e9bb84..000000000
--- a/apps/web/__tests__/test/smoke/passwordPage.cy.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-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
deleted file mode 100644
index be00a1ae5..000000000
--- a/apps/web/__tests__/test/smoke/signupPage.cy.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-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/components/Editor/Editor.vue b/apps/web/components/Editor/Editor.vue
index 9d6f6446b..6cda66642 100644
--- a/apps/web/components/Editor/Editor.vue
+++ b/apps/web/components/Editor/Editor.vue
@@ -26,6 +26,7 @@
diff --git a/apps/web/components/ProductRecommendedProducts/ProductRecommendedProducts.vue b/apps/web/components/ProductRecommendedProducts/ProductRecommendedProducts.vue
index 8c415b492..99b55926e 100644
--- a/apps/web/components/ProductRecommendedProducts/ProductRecommendedProducts.vue
+++ b/apps/web/components/ProductRecommendedProducts/ProductRecommendedProducts.vue
@@ -9,8 +9,8 @@
{{ text.subtitle }}
diff --git a/apps/web/components/TextContent/TextContent.vue b/apps/web/components/TextContent/TextContent.vue
new file mode 100644
index 000000000..8f7c26d38
--- /dev/null
+++ b/apps/web/components/TextContent/TextContent.vue
@@ -0,0 +1,38 @@
+
+
+
{{ text.pretitle }}
+
{{ text.title }}
+
{{ text.subtitle }}
+
+
+ {{ button?.label }}
+
+
+
+
+
diff --git a/apps/web/components/TextContent/types.ts b/apps/web/components/TextContent/types.ts
new file mode 100644
index 000000000..640f4cb81
--- /dev/null
+++ b/apps/web/components/TextContent/types.ts
@@ -0,0 +1,14 @@
+export type TextContentProps = {
+ text?: {
+ pretitle?: string;
+ title?: string;
+ subtitle?: string;
+ htmlDescription?: string;
+ textAlignment?: 'left' | 'center' | 'right';
+ };
+ button?: {
+ label?: string;
+ link?: string;
+ variant?: 'primary' | 'secondary';
+ };
+};
diff --git a/apps/web/components/ui/AccordionItem/AccordionItem.vue b/apps/web/components/ui/AccordionItem/AccordionItem.vue
index da151f4be..3efd51b38 100644
--- a/apps/web/components/ui/AccordionItem/AccordionItem.vue
+++ b/apps/web/components/ui/AccordionItem/AccordionItem.vue
@@ -4,7 +4,7 @@
{{ summary }}
-
+
@@ -18,7 +18,7 @@ import { useVModel } from '@vueuse/core';
import type { AccordionItemProps } from '~/components/ui/AccordionItem/types';
const props = defineProps
();
-const { modelValue = false, summary = '', summaryClass = '' } = props;
+const { summary = '', summaryClass = '' } = props;
const emit = defineEmits(['update:modelValue']);
const internalModelValue = useVModel(props, 'modelValue', emit, { passive: true });
diff --git a/apps/web/components/ui/ImageText/ImageText.vue b/apps/web/components/ui/ImageText/ImageText.vue
new file mode 100644
index 000000000..5988a781e
--- /dev/null
+++ b/apps/web/components/ui/ImageText/ImageText.vue
@@ -0,0 +1,52 @@
+
+
+
+
+
diff --git a/apps/web/components/ui/ImageText/types.ts b/apps/web/components/ui/ImageText/types.ts
new file mode 100644
index 000000000..9f2a9be8d
--- /dev/null
+++ b/apps/web/components/ui/ImageText/types.ts
@@ -0,0 +1,27 @@
+export type ImageTextProps = {
+ image?: {
+ desktop?: string;
+ tablet?: string;
+ mobile?: string;
+ alt: string;
+ imageAlignment: 'left' | 'right';
+ };
+
+ text?: {
+ pretitle?: string;
+ title?: string;
+ subtitle?: string;
+ htmlDescription?: string;
+ textAlignment?: 'left' | 'center' | 'right';
+ };
+ button?: {
+ label?: string;
+ link?: string;
+ variant?: 'primary' | 'secondary';
+ };
+};
+
+export interface ImageDimensions {
+ width: number;
+ height: number;
+}
diff --git a/apps/web/components/ui/MediaCard/MediaCard.vue b/apps/web/components/ui/MediaCard/MediaCard.vue
deleted file mode 100644
index fd97694c7..000000000
--- a/apps/web/components/ui/MediaCard/MediaCard.vue
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/apps/web/components/ui/MediaCard/types.ts b/apps/web/components/ui/MediaCard/types.ts
deleted file mode 100644
index 3eaf5cd1a..000000000
--- a/apps/web/components/ui/MediaCard/types.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export type MediaItemProps = {
- text: string;
- image: string;
- alt: string;
- alignment: string;
-};
diff --git a/apps/web/components/ui/TextCard/TextCard.vue b/apps/web/components/ui/TextCard/TextCard.vue
index 7ccf49699..842347197 100644
--- a/apps/web/components/ui/TextCard/TextCard.vue
+++ b/apps/web/components/ui/TextCard/TextCard.vue
@@ -1,18 +1,6 @@
-
{{ props.text.pretitle }}
-
{{ props.text.title }}
-
{{ props.text.subtitle }}
-
-
- {{ props.button?.label }}
-
+
@@ -20,20 +8,15 @@
import type { TextCardProps } from '~/components/ui/TextCard/types';
const props = defineProps();
-const localePath = useLocalePath();
-const NuxtLink = resolveComponent('NuxtLink');
const textAlignmentClass = computed(() => {
switch (props.text?.textAlignment) {
- case 'center': {
+ case 'center':
return 'text-center items-center';
- }
- case 'right': {
+ case 'right':
return 'text-right items-end';
- }
- default: {
+ default:
return 'text-left items-start';
- }
}
});
diff --git a/apps/web/components/ui/Toolbar/Toolbar.vue b/apps/web/components/ui/Toolbar/Toolbar.vue
index c0968914a..85844a389 100644
--- a/apps/web/components/ui/Toolbar/Toolbar.vue
+++ b/apps/web/components/ui/Toolbar/Toolbar.vue
@@ -9,7 +9,6 @@