diff --git a/cypress/e2e/thread_resume/spec.cy.ts b/cypress/e2e/thread_resume/spec.cy.ts index 72c805e74a..97eb898cfb 100644 --- a/cypress/e2e/thread_resume/spec.cy.ts +++ b/cypress/e2e/thread_resume/spec.cy.ts @@ -1,18 +1,18 @@ import { submitMessage } from '../../support/testUtils'; const login = (user: 'alice' | 'bob') => { + cy.step('Login'); + cy.visit('/'); + cy.location('pathname').should('eq', '/login'); - cy.get("input[name='email']").clear().type(user); - cy.get("input[name='password']").clear().type(((user === 'alice') ? 'a' : 'b')); - - cy.intercept('POST', '/login').as('loginReq'); - cy.intercept('GET', '/user').as('userReq'); + cy.get("#email").should('be.visible').clear().type(user); + cy.get("#password").should('be.visible').clear().type(((user === 'alice') ? 'a' : 'b')); cy.get("button[type='submit']").click(); - cy.location('pathname', { timeout: 10000 }).should('eq', '/'); + cy.location('pathname').should('eq', '/'); }; describe('Thread resume (author)', () => { @@ -30,8 +30,8 @@ describe('Thread resume (author)', () => { cy.get('#message-composer').should('be.visible'); cy.get('[data-testid="read-only-banner"]').should('not.exist'); - // Continue chatting - submitMessage('still here'); - cy.get("[data-step-type='assistant_message']").contains('Echo: still here'); + // Continue chatting + submitMessage('still here'); + cy.get("[data-step-type='assistant_message']").contains('Echo: still here'); }); });