From 4b763d51681ff55932262dcc6326e0c3a67d0f3f Mon Sep 17 00:00:00 2001 From: Iustin Serian Date: Wed, 22 Oct 2025 10:01:24 +0300 Subject: [PATCH 1/3] fix call waitForPage before visit --- .../cypress/e2e/regression/user_access/login.core-e2e.cy.ts | 3 --- projects/storefrontapp-e2e-cypress/cypress/helpers/login.ts | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/user_access/login.core-e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/user_access/login.core-e2e.cy.ts index c77327deed5..35a45f2cce8 100644 --- a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/user_access/login.core-e2e.cy.ts +++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/user_access/login.core-e2e.cy.ts @@ -14,9 +14,6 @@ describe('Login', () => { cy.whenJDK17(() => { visitLoginPage(); }); - cy.whenJDK21(() => { - cy.visit('/login/register'); - }); login.registerUserFromLoginPage(); }); diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/login.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/login.ts index 810977d1240..3bf4788cdb3 100644 --- a/projects/storefrontapp-e2e-cypress/cypress/helpers/login.ts +++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/login.ts @@ -36,6 +36,7 @@ export function registerUserFromLoginPage(uniqueUser?: boolean) { cy.whenJDK21(() => { const registerPage = waitForPage('/login/register', 'getRegisterPage'); + cy.visit('/login/register'); cy.wait(`@${registerPage}`).its('response.statusCode').should('eq', 200); }); From e6689290f52e6b7325eccf356f8633eb6463bb5b Mon Sep 17 00:00:00 2001 From: Iustin Serian Date: Fri, 31 Oct 2025 21:54:50 +0200 Subject: [PATCH 2/3] fix remove redundant visit --- .../cypress/cypress.config.js | 9 +++++++ .../cypress/cypress/fixtures/example.json | 5 ++++ .../cypress/cypress/support/commands.js | 25 +++++++++++++++++++ .../cypress/cypress/support/e2e.js | 17 +++++++++++++ .../user_access/early-login.core-e2e.cy.ts | 5 ---- .../navigation-login-a11y.e2e.cy.ts | 3 --- 6 files changed, 56 insertions(+), 8 deletions(-) create mode 100644 projects/storefrontapp-e2e-cypress/cypress/cypress.config.js create mode 100644 projects/storefrontapp-e2e-cypress/cypress/cypress/fixtures/example.json create mode 100644 projects/storefrontapp-e2e-cypress/cypress/cypress/support/commands.js create mode 100644 projects/storefrontapp-e2e-cypress/cypress/cypress/support/e2e.js diff --git a/projects/storefrontapp-e2e-cypress/cypress/cypress.config.js b/projects/storefrontapp-e2e-cypress/cypress/cypress.config.js new file mode 100644 index 00000000000..97f47c4127b --- /dev/null +++ b/projects/storefrontapp-e2e-cypress/cypress/cypress.config.js @@ -0,0 +1,9 @@ +const { defineConfig } = require("cypress"); + +module.exports = defineConfig({ + e2e: { + setupNodeEvents(on, config) { + // implement node event listeners here + }, + }, +}); diff --git a/projects/storefrontapp-e2e-cypress/cypress/cypress/fixtures/example.json b/projects/storefrontapp-e2e-cypress/cypress/cypress/fixtures/example.json new file mode 100644 index 00000000000..02e4254378e --- /dev/null +++ b/projects/storefrontapp-e2e-cypress/cypress/cypress/fixtures/example.json @@ -0,0 +1,5 @@ +{ + "name": "Using fixtures to represent data", + "email": "hello@cypress.io", + "body": "Fixtures are a great way to mock data for responses to routes" +} diff --git a/projects/storefrontapp-e2e-cypress/cypress/cypress/support/commands.js b/projects/storefrontapp-e2e-cypress/cypress/cypress/support/commands.js new file mode 100644 index 00000000000..66ea16ef0e3 --- /dev/null +++ b/projects/storefrontapp-e2e-cypress/cypress/cypress/support/commands.js @@ -0,0 +1,25 @@ +// *********************************************** +// This example commands.js shows you how to +// create various custom commands and overwrite +// existing commands. +// +// For more comprehensive examples of custom +// commands please read more here: +// https://on.cypress.io/custom-commands +// *********************************************** +// +// +// -- This is a parent command -- +// Cypress.Commands.add('login', (email, password) => { ... }) +// +// +// -- This is a child command -- +// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) +// +// +// -- This is a dual command -- +// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) +// +// +// -- This will overwrite an existing command -- +// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) \ No newline at end of file diff --git a/projects/storefrontapp-e2e-cypress/cypress/cypress/support/e2e.js b/projects/storefrontapp-e2e-cypress/cypress/cypress/support/e2e.js new file mode 100644 index 00000000000..3eaffffa6b4 --- /dev/null +++ b/projects/storefrontapp-e2e-cypress/cypress/cypress/support/e2e.js @@ -0,0 +1,17 @@ +// *********************************************************** +// This example support/e2e.js is processed and +// loaded automatically before your test files. +// +// This is a great place to put global configuration and +// behavior that modifies Cypress. +// +// You can change the location of this file or turn off +// automatically serving support files with the +// 'supportFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/configuration +// *********************************************************** + +// Import commands.js using ES2015 syntax: +import './commands' \ No newline at end of file diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/user_access/early-login.core-e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/user_access/early-login.core-e2e.cy.ts index 47c5097ea37..f102ec9ec48 100644 --- a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/user_access/early-login.core-e2e.cy.ts +++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/user_access/early-login.core-e2e.cy.ts @@ -50,11 +50,6 @@ context('Early login', () => { it('should redirect to login page and redirect back after sign in', () => { cy.url().should('contain', '/login'); - cy.whenJDK21(() => { - // Conflict with JDK21 behavior: cannot access register from auth server login page - cy.visit('/login/register'); - }); - login.registerUserFromLoginPage(); cy.whenJDK21(() => { visitLoginPage(); diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/user_access/navigation-login-a11y.e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/user_access/navigation-login-a11y.e2e.cy.ts index 1d27792e91b..1ced7a8d630 100644 --- a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/user_access/navigation-login-a11y.e2e.cy.ts +++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/user_access/navigation-login-a11y.e2e.cy.ts @@ -23,9 +23,6 @@ describe('Navigation Login', () => { cy.whenJDK17(() => { visitLoginPage(); }); - cy.whenJDK21(() => { - cy.visit('/login/register'); - }); user = login.registerUserFromLoginPage(); login.loginUser(); From a08968ebf9746da8eeda3f3dba3b4a14915145b1 Mon Sep 17 00:00:00 2001 From: Iustin Serian Date: Mon, 3 Nov 2025 17:30:16 +0200 Subject: [PATCH 3/3] fix clean up generated files --- .../cypress/cypress.config.js | 9 ------- .../cypress/cypress/fixtures/example.json | 5 ---- .../cypress/cypress/support/commands.js | 25 ------------------- .../cypress/cypress/support/e2e.js | 17 ------------- 4 files changed, 56 deletions(-) delete mode 100644 projects/storefrontapp-e2e-cypress/cypress/cypress.config.js delete mode 100644 projects/storefrontapp-e2e-cypress/cypress/cypress/fixtures/example.json delete mode 100644 projects/storefrontapp-e2e-cypress/cypress/cypress/support/commands.js delete mode 100644 projects/storefrontapp-e2e-cypress/cypress/cypress/support/e2e.js diff --git a/projects/storefrontapp-e2e-cypress/cypress/cypress.config.js b/projects/storefrontapp-e2e-cypress/cypress/cypress.config.js deleted file mode 100644 index 97f47c4127b..00000000000 --- a/projects/storefrontapp-e2e-cypress/cypress/cypress.config.js +++ /dev/null @@ -1,9 +0,0 @@ -const { defineConfig } = require("cypress"); - -module.exports = defineConfig({ - e2e: { - setupNodeEvents(on, config) { - // implement node event listeners here - }, - }, -}); diff --git a/projects/storefrontapp-e2e-cypress/cypress/cypress/fixtures/example.json b/projects/storefrontapp-e2e-cypress/cypress/cypress/fixtures/example.json deleted file mode 100644 index 02e4254378e..00000000000 --- a/projects/storefrontapp-e2e-cypress/cypress/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" -} diff --git a/projects/storefrontapp-e2e-cypress/cypress/cypress/support/commands.js b/projects/storefrontapp-e2e-cypress/cypress/cypress/support/commands.js deleted file mode 100644 index 66ea16ef0e3..00000000000 --- a/projects/storefrontapp-e2e-cypress/cypress/cypress/support/commands.js +++ /dev/null @@ -1,25 +0,0 @@ -// *********************************************** -// This example commands.js shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** -// -// -// -- This is a parent command -- -// Cypress.Commands.add('login', (email, password) => { ... }) -// -// -// -- This is a child command -- -// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) -// -// -// -- This is a dual command -- -// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) -// -// -// -- This will overwrite an existing command -- -// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) \ No newline at end of file diff --git a/projects/storefrontapp-e2e-cypress/cypress/cypress/support/e2e.js b/projects/storefrontapp-e2e-cypress/cypress/cypress/support/e2e.js deleted file mode 100644 index 3eaffffa6b4..00000000000 --- a/projects/storefrontapp-e2e-cypress/cypress/cypress/support/e2e.js +++ /dev/null @@ -1,17 +0,0 @@ -// *********************************************************** -// This example support/e2e.js is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import './commands' \ No newline at end of file