Files
triqura-ecd/tests/cypress/cortex/command-center.cy.ts
colinislit 9195eb9fed 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>
2026-07-09 23:16:17 +02:00

36 lines
1.5 KiB
TypeScript

describe('Cortex Command Center - UI', () => {
beforeEach(() => {
cy.login();
cy.visit('/epd/cortex');
cy.get('textarea[placeholder="Typ of spreek wat je wilt doen..."]:first').should('be.visible');
});
it('laadt de command center interface', () => {
cy.get('textarea[placeholder="Typ of spreek wat je wilt doen..."]:first').should('be.visible');
cy.contains('Welkom bij Cortex Assistent').first().should('be.visible');
});
it('chat input accepteert tekst', () => {
cy.get('textarea[placeholder="Typ of spreek wat je wilt doen..."]:first').type('test invoer');
cy.get('textarea[placeholder="Typ of spreek wat je wilt doen..."]:first').should('have.value', 'test invoer');
});
it('keyboard shortcut ⌘K focust de input', () => {
cy.get('body').click();
cy.get('body').type('{meta}k');
cy.get('textarea[placeholder="Typ of spreek wat je wilt doen..."]:first').should('be.focused');
});
it('escape wist de input', () => {
cy.get('textarea[placeholder="Typ of spreek wat je wilt doen..."]:first').type('iets typen');
cy.get('textarea[placeholder="Typ of spreek wat je wilt doen..."]:first').type('{esc}');
cy.get('textarea[placeholder="Typ of spreek wat je wilt doen..."]:first').should('have.value', '');
});
it('toont voorbeeldcommandos in de empty state', () => {
cy.contains('Dagnotitie maken').first().should('be.visible');
cy.contains('Patiënt zoeken').first().should('be.visible');
cy.contains('Overdracht maken').first().should('be.visible');
});
});