diff --git a/frontend/packages/integration-tests-cypress/support/login.ts b/frontend/packages/integration-tests-cypress/support/login.ts index f054fe536a5..810d8617f81 100644 --- a/frontend/packages/integration-tests-cypress/support/login.ts +++ b/frontend/packages/integration-tests-cypress/support/login.ts @@ -22,7 +22,7 @@ Cypress.Commands.add( cy.session( [provider, username], () => { - cy.visit('/'); // visits baseUrl which is set in plugins/index.js + cy.visit(Cypress.config('baseUrl')); cy.window().then((win: any) => { // Check if auth is disabled (for a local development environment) if (win.SERVER_FLAGS?.authDisabled) { @@ -69,8 +69,13 @@ Cypress.Commands.add( } }); }, - { cacheAcrossSpecs: true }, + { + cacheAcrossSpecs: true, + validate() { + // If unable to visit the baseURL, login has failed, and the session will be re-created. + cy.visit(Cypress.config('baseUrl')); + }, + }, ); - cy.visit('/'); // visits baseUrl which is set in plugins/index.js }, ); diff --git a/frontend/packages/integration-tests-cypress/tests/app/poll-console-updates.cy.ts b/frontend/packages/integration-tests-cypress/tests/app/poll-console-updates.cy.ts index 7ea209e5c2e..479ab0c68d3 100644 --- a/frontend/packages/integration-tests-cypress/tests/app/poll-console-updates.cy.ts +++ b/frontend/packages/integration-tests-cypress/tests/app/poll-console-updates.cy.ts @@ -96,7 +96,7 @@ describe('PollConsoleUpdates Test', () => { cy.wait(`@${CHECK_UPDATES_ALIAS}`, WAIT_OPTIONS); cy.intercept(PLUGIN_MANIFEST_URL2, { forceNetworkError: true }).as(CHECK_MANIFEST_ALIAS2); cy.wait(`@${CHECK_MANIFEST_ALIAS2}`, WAIT_OPTIONS); - // cy.wait(`@${CHECK_MANIFEST_ALIAS2}`, WAIT_OPTIONS).should('have.property', 'error'); + cy.wait(`@${CHECK_MANIFEST_ALIAS2}`, WAIT_OPTIONS).should('have.property', 'error'); cy.byTestID('loading-indicator').should('not.exist'); cy.get(refreshWebConsoleLink).should('not.exist'); cy.intercept(PLUGIN_MANIFEST_URL2, PLUGIN_MANIFEST_DEFAULT2).as(CHECK_MANIFEST_ALIAS2);