test: Cypress en Playwright e2e-suites voor login, agenda, cortex en verpleegrapportage
Configs voor beide runners, login via session caching, AI-chat mocks (SSE) voor deterministische Cortex-tests. Supabase local config toegevoegd. Auth-state en reports zijn gitignored. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
44
tests/cypress/cortex/dagnotitie-flow.cy.ts
Normal file
44
tests/cypress/cortex/dagnotitie-flow.cy.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
describe('Cortex - Demo flows', () => {
|
||||
beforeEach(() => {
|
||||
cy.login();
|
||||
cy.visit('/epd/cortex');
|
||||
cy.get('textarea[placeholder="Typ of spreek wat je wilt doen..."]:first').should('be.visible');
|
||||
});
|
||||
|
||||
it('dagnotitie flow: bericht → AI response → artifact verschijnt', () => {
|
||||
cy.mockDagnotitieChat('Jan de Vries');
|
||||
cy.get('textarea[placeholder="Typ of spreek wat je wilt doen..."]:first').type('notitie jan de vries voelt zich goed vandaag{enter}');
|
||||
cy.contains('notitie jan de vries voelt zich goed vandaag').first().should('be.visible');
|
||||
cy.contains('Genoteerd.').first().should('be.visible');
|
||||
});
|
||||
|
||||
it('dagnotitie flow: input is leeg na verzenden', () => {
|
||||
cy.mockDagnotitieChat();
|
||||
cy.get('textarea[placeholder="Typ of spreek wat je wilt doen..."]:first').type('notitie jan medicatie gegeven{enter}');
|
||||
cy.get('textarea[placeholder="Typ of spreek wat je wilt doen..."]:first').should('have.value', '');
|
||||
});
|
||||
|
||||
it('zoeken flow: bericht → zoek-artifact verschijnt', () => {
|
||||
cy.mockZoekenChat('Marie');
|
||||
cy.get('textarea[placeholder="Typ of spreek wat je wilt doen..."]:first').type('zoek marie{enter}');
|
||||
cy.contains('Even kijken.').first().should('be.visible');
|
||||
});
|
||||
|
||||
it('onbekende intent: AI vraagt om verduidelijking', () => {
|
||||
cy.mockOnbekendChat();
|
||||
cy.get('textarea[placeholder="Typ of spreek wat je wilt doen..."]:first').type('xyz{enter}');
|
||||
cy.contains('snap niet helemaal wat je bedoelt').first().should('be.visible');
|
||||
});
|
||||
|
||||
it('meerdere berichten: chat history groeit', () => {
|
||||
cy.mockDagnotitieChat();
|
||||
cy.get('textarea[placeholder="Typ of spreek wat je wilt doen..."]:first').type('notitie jan medicatie gegeven{enter}');
|
||||
cy.contains('Genoteerd.').first().should('be.visible');
|
||||
|
||||
cy.mockDagnotitieChat('Marie');
|
||||
cy.get('textarea[placeholder="Typ of spreek wat je wilt doen..."]:first').type('notitie marie slaapt slecht{enter}');
|
||||
|
||||
cy.contains('notitie jan medicatie gegeven').first().should('be.visible');
|
||||
cy.contains('notitie marie slaapt slecht').first().should('be.visible');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user