From c73eab0b97507fb33738c0fc0fa8d118d05285dc Mon Sep 17 00:00:00 2001 From: JBlixems Date: Thu, 18 Jul 2024 11:38:56 +0200 Subject: [PATCH] Change the correct timeouts --- CoVAR-app/cypress/e2e/adminTools.cy.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CoVAR-app/cypress/e2e/adminTools.cy.ts b/CoVAR-app/cypress/e2e/adminTools.cy.ts index 2ed7036..6dbe4d1 100644 --- a/CoVAR-app/cypress/e2e/adminTools.cy.ts +++ b/CoVAR-app/cypress/e2e/adminTools.cy.ts @@ -5,7 +5,7 @@ describe('Admin tools E2E Tests', () => { it('client should not see admin tools or evaluate page', () => { // Login - cy.get('input[name="email"]', { timeout: 10000 }).type(Cypress.env('client_username'), { log: false }) + cy.get('input[name="email"]', { timeout: 4000 }).type(Cypress.env('client_username'), { log: false }) cy.get('input[name="password"]').type(Cypress.env('client_password'), { log: false }) cy.get('button[type="submit"]').click() @@ -14,12 +14,12 @@ describe('Admin tools E2E Tests', () => { cy.get('[test-id="evaluateLink"]').should('not.exist'); //Logout - cy.get('[test-id="logoutButton"]', { timeout: 4500 }).click(); + cy.get('[test-id="logoutButton"]', { timeout: 8000 }).click(); }) it('demote a va to client and promote again', () => { // Login - cy.get('input[name="email"]', { timeout: 10000 }).type(Cypress.env('admin_username'), { log: false }) + cy.get('input[name="email"]', { timeout: 4000 }).type(Cypress.env('admin_username'), { log: false }) cy.get('input[name="password"]').type(Cypress.env('admin_password'), { log: false }) cy.get('button[type="submit"]').click() @@ -27,7 +27,7 @@ describe('Admin tools E2E Tests', () => { cy.get('[test-id="adminToolsLink"]', { timeout: 4500 }).click(); //Demote and promote - cy.get('.MuiDataGrid-root .MuiDataGrid-row').contains(Cypress.env('va_username'), { log: false }).closest('.MuiDataGrid-row').contains('button', 'Unassign').click(); + cy.get('.MuiDataGrid-root .MuiDataGrid-row', { timeout: 8000 }).contains(Cypress.env('va_username'), { log: false }).closest('.MuiDataGrid-row').contains('button', 'Unassign').click(); cy.get('.MuiDataGrid-root .MuiDataGrid-row').contains(Cypress.env('va_username'), { log: false }).closest('.MuiDataGrid-row').contains('client').should('exist'); cy.get('.MuiDataGrid-root .MuiDataGrid-row').contains(Cypress.env('va_username'), { log: false }).closest('.MuiDataGrid-row').contains('button', 'Assign VA').click(); cy.get('.MuiDataGrid-root .MuiDataGrid-row').contains(Cypress.env('va_username'), { log: false }).closest('.MuiDataGrid-row').contains('va').should('exist');