test(e2e): playwright smoke for create→practice flow

This commit is contained in:
2026-05-20 21:29:51 +02:00
parent b1992d0dad
commit f88b4d57de
6 changed files with 110 additions and 0 deletions

16
e2e/smoke.spec.ts Normal file
View File

@@ -0,0 +1,16 @@
import { test, expect } from '@playwright/test';
test('create lesson, add card, practice once', async ({ page }) => {
await page.goto('/admin');
await page.getByPlaceholder('Nieuwe wortel-les...').fill('E2E les');
await page.getByRole('button', { name: 'Toevoegen' }).click();
await page.getByRole('link', { name: /E2E les/ }).click();
await page.getByPlaceholder('Nieuwe vraag').fill('q1');
await page.getByPlaceholder('Antwoord').fill('a1');
await page.getByRole('button', { name: '+' }).click();
await page.getByRole('link', { name: /Start oefenen/ }).click();
await page.getByRole('button', { name: 'Start' }).click();
await page.getByRole('button', { name: 'Toon antwoord' }).click();
await page.getByRole('button', { name: 'Goed' }).click();
await expect(page.getByText(/Sessie klaar!/)).toBeVisible();
});