Skip to content

Commit

Permalink
Merge pull request #13242 from rhamilto/CONSOLE-3740
Browse files Browse the repository at this point in the history
CONSOLE-3740: follow-on fixes and cleanup for Cypress upgrade
  • Loading branch information
openshift-ci[bot] committed Oct 18, 2023
2 parents edeb3cd + 1dfbf60 commit db9f7eb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions frontend/packages/integration-tests-cypress/support/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
},
);
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit db9f7eb

Please sign in to comment.