diff --git a/frontend-e2e/cypress/e2e/homepage.cy.js b/frontend-e2e/cypress/e2e/homepage.cy.js index df27c58a..ead0ccb2 100644 --- a/frontend-e2e/cypress/e2e/homepage.cy.js +++ b/frontend-e2e/cypress/e2e/homepage.cy.js @@ -6,6 +6,7 @@ const admin = users.filter(({username}) => username === 'admin@example.org')[0]; beforeEach(() => { cy.visit(`${Cypress.env('CY_STEMMAWEB_FRONTEND_URL')}/`); + cy.viewport(1600, 900); cy.loginViaUi(admin); }); diff --git a/frontend-e2e/cypress/support/commands.js b/frontend-e2e/cypress/support/commands.js index e6ea0895..e49a0593 100644 --- a/frontend-e2e/cypress/support/commands.js +++ b/frontend-e2e/cypress/support/commands.js @@ -30,6 +30,7 @@ Cypress.Commands.add('loginViaUi', (userObj) => { cy.get('#loginEmail').wait(500).type(userObj.username, { delay: 50 }); cy.get('#loginPassword').wait(500).type(userObj.password, { delay: 50 }); cy.get('button').contains('Sign in').wait(500).click(); + cy.get('#authModal').should('not.be.visible'); cy.contains('Logged in as ' + userObj.username); cy.contains('header a', 'Sign out'); cy.get('header').should('not.contain', 'Sign in');