diff --git a/scripts/cypress-v2/integration/common/5a_user_role.js b/scripts/cypress-v2/integration/common/5a_user_role.js index 91cad20502..039ee9764d 100644 --- a/scripts/cypress-v2/integration/common/5a_user_role.js +++ b/scripts/cypress-v2/integration/common/5a_user_role.js @@ -177,13 +177,7 @@ export const genTest = (apiType, dbType) => { after(() => { // sign out - cy.visit(`/`); - cy.wait(5000); - cy.get('.nc-menu-accounts').should('exist').click(); - cy.getActiveMenu().find('.ant-dropdown-menu-item').eq(1).click(); - - cy.wait(5000); - cy.get('button:contains("SIGN")').should('exist') + cy.signOut(); }); /////////////////////////////////////////////////////// diff --git a/scripts/cypress-v2/integration/common/9a_QuickTest.js b/scripts/cypress-v2/integration/common/9a_QuickTest.js index 0603135aba..41c0ab41f8 100644 --- a/scripts/cypress-v2/integration/common/9a_QuickTest.js +++ b/scripts/cypress-v2/integration/common/9a_QuickTest.js @@ -110,13 +110,7 @@ export const genTest = (apiType, dbType, testMode) => { cy.restoreLocalStorage(); // sign out - cy.visit(`/`); - cy.wait(5000); - cy.get('.nc-menu-accounts').should('exist').click(); - cy.getActiveMenu().find('.ant-dropdown-menu-item').eq(1).click(); - - cy.wait(5000); - cy.get('button:contains("SIGN")').should('exist') + cy.signOut(); }); it("Verify Schema", () => { diff --git a/scripts/cypress-v2/integration/test/xcdb-restRoles.js b/scripts/cypress-v2/integration/test/xcdb-restRoles.js index bd87bf6c27..5a270a6a85 100644 --- a/scripts/cypress-v2/integration/test/xcdb-restRoles.js +++ b/scripts/cypress-v2/integration/test/xcdb-restRoles.js @@ -6,10 +6,6 @@ const { setCurrentMode, } = require("../../support/page_objects/projectConstants"); -// use 0 as mode to execute individual files (debug mode, skip pre-configs) -// use 1 mode if noco.db doesnt contain user credentials (full run over GIT) -const executionMode = 1; - const nocoTestSuite = (apiType, dbType) => { setCurrentMode(apiType, dbType); t01.genTest(apiType, dbType); diff --git a/scripts/cypress-v2/support/commands.js b/scripts/cypress-v2/support/commands.js index 000bdc194d..fa2e64ed59 100644 --- a/scripts/cypress-v2/support/commands.js +++ b/scripts/cypress-v2/support/commands.js @@ -481,8 +481,8 @@ Cypress.Commands.add("fileHook", () => { Cypress.Commands.add("signOut", () => { // sign out cy.visit(`/`); - cy.wait(5000); - cy.get('.nc-menu-accounts').should('exist').click(); + cy.get('.nc-project-page-title', {timeout: 30000}).contains("My Projects").should("be.visible"); + cy.get('.nc-menu-accounts', {timeout: 30000}).should('exist').click(); cy.getActiveMenu().find('.ant-dropdown-menu-item').eq(1).click(); cy.wait(5000);