Files
triqura-ecd/tests/cypress/login.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

37 lines
1.2 KiB
TypeScript

describe('Login flow', () => {
beforeEach(() => {
cy.visit('/login');
});
it('toont de loginpagina correct', () => {
cy.get('h2').should('contain', 'Welkom terug');
cy.get('#email').should('be.visible');
cy.get('#password').should('be.visible');
cy.get('button[type="submit"]').should('contain', 'Inloggen');
});
it('toont foutmelding bij verkeerde inloggegevens', () => {
cy.get('#email').type('verkeerd@email.nl');
cy.get('#password').type('foutWachtwoord123');
cy.get('button[type="submit"]').click();
cy.contains('onjuist').should('be.visible');
});
it('demo login knop is zichtbaar en werkt', () => {
cy.contains('Demo Account Proberen').should('be.visible').click();
cy.url().should('match', /\/epd\//);
});
it('redirect naar EPD na succesvol inloggen', () => {
cy.get('#email').type(Cypress.env('TEST_EMAIL') ?? 'demo@mini-ecd.demo');
cy.get('#password').type(Cypress.env('TEST_PASSWORD') ?? 'Demo2024!');
cy.get('button[type="submit"]').click();
cy.url().should('match', /\/epd\//);
});
it('beveiligde route stuurt door naar login', () => {
cy.visit('/epd/dashboard');
cy.url().should('include', '/login');
});
});