b7f52be4c9
CI / Run CI (push) Has been cancelled
CI / check-backend (push) Has been cancelled
CI / check-frontend (push) Has been cancelled
CI / tests (push) Has been cancelled
CI / e2e-tests (push) Has been cancelled
Copilot Setup Steps / copilot-setup-steps (push) Has been cancelled
39 lines
1.0 KiB
TypeScript
39 lines
1.0 KiB
TypeScript
import { submitMessage } from '../../support/testUtils';
|
|
|
|
function newSession() {
|
|
cy.get('#header')
|
|
.get('#new-chat-button')
|
|
.should('exist')
|
|
.click({ force: true });
|
|
cy.get('#new-chat-dialog').should('exist');
|
|
cy.get('#confirm').should('exist').click();
|
|
|
|
cy.get('#new-chat-dialog').should('not.exist');
|
|
}
|
|
|
|
describe('User Session', () => {
|
|
it('should be able to store data related per user session', () => {
|
|
submitMessage('Hello 1');
|
|
|
|
cy.get('.step').should('have.length', 2);
|
|
cy.get('.step').eq(1).should('contain', 'Prev message: None');
|
|
|
|
submitMessage('Hello 2');
|
|
|
|
cy.get('.step').should('have.length', 4);
|
|
cy.get('.step').eq(3).should('contain', 'Prev message: Hello 1');
|
|
|
|
newSession();
|
|
|
|
submitMessage('Hello 3');
|
|
|
|
cy.get('.step').should('have.length', 2);
|
|
cy.get('.step').eq(1).should('contain', 'Prev message: None');
|
|
|
|
submitMessage('Hello 4');
|
|
|
|
cy.get('.step').should('have.length', 4);
|
|
cy.get('.step').eq(3).should('contain', 'Prev message: Hello 3');
|
|
});
|
|
});
|