diff --git a/Apps/Admin/Tests/Functional/cypress/support/commands.js b/Apps/Admin/Tests/Functional/cypress/support/commands.js index 89a5da09d1..824ff23424 100644 --- a/Apps/Admin/Tests/Functional/cypress/support/commands.js +++ b/Apps/Admin/Tests/Functional/cypress/support/commands.js @@ -46,6 +46,10 @@ Cypress.Commands.add("logout", () => { }); Cypress.Commands.add("login", (username, password, path) => { + // Clear cookies and local storage before starting the login process + cy.clearCookies(); + cy.clearLocalStorage(); + cy.session(username, () => { cy.log("Logging in using Keycloak."); cy.readConfig().then((config) => {