test(e2e): playwright smoke for create→practice flow
This commit is contained in:
16
e2e/smoke.spec.ts
Normal file
16
e2e/smoke.spec.ts
Normal 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();
|
||||
});
|
||||
Reference in New Issue
Block a user