Skip to content

Commit

Permalink
Change the correct timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
JBlixems committed Jul 18, 2024
1 parent 71ab222 commit c73eab0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CoVAR-app/cypress/e2e/adminTools.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -14,20 +14,20 @@ 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()

//Navigate to the admin tools page
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');
Expand Down

0 comments on commit c73eab0

Please sign in to comment.