diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index be9892aa..bca976ac 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -82,32 +82,18 @@ Cypress.Commands.add( ).then((result) => { cy.log(result.stdout); cy.task('log', result.stdout); - if (result.stdout.includes('Ready')) { - cy.log(oauthurl); - cy.task('log', oauthurl); - cy.origin( - oauthurl, - { args: { username, password } }, - // eslint-disable-next-line @typescript-eslint/no-shadow - ({ username, password }) => { - cy.get('#inputUsername').type(username); - cy.get('#inputPassword').type(password); - cy.get('button[type=submit]').click(); - }, - ); - } else { - // Note required duplication in if above due to limitations of cy.origin - cy.task('log', ` Logging in as ${username}`); - cy.get('[data-test-id="login"]').should('be.visible'); - cy.get('body').then(($body) => { - if ($body.text().includes(provider)) { - cy.contains(provider).should('be.visible').click(); - } - }); - cy.get('#inputUsername').type(username); - cy.get('#inputPassword').type(password); - cy.get('button[type=submit]').click(); - } + cy.log(oauthurl); + cy.task('log', oauthurl); + cy.origin( + oauthurl, + { args: { username, password } }, + // eslint-disable-next-line @typescript-eslint/no-shadow + ({ username, password }) => { + cy.get('#inputUsername').type(username); + cy.get('#inputPassword').type(password); + cy.get('button[type=submit]').click(); + }, + ); }); }, );