Files
flashcards/packages/frontend/playwright.config.ts
Bert Hausmans 8499c60acb test(e2e): search palette + lesson detail + stats + legacy redirect
Add e2e/ux.spec.ts covering the ⌘K search palette, lesson detail page,
stats sections, and the legacy /admin → /lessons redirect.

Also fixes two issues uncovered by running the full suite:
- Skip auth rate limiter in e2e by running the backend with NODE_ENV=test
  (registration limit of 5 was tripping later tests).
- Render the card table for lesson owners even when the lesson has zero
  cards, so the first card can be added from the detail page.
2026-05-21 07:24:42 +02:00

26 lines
817 B
TypeScript

import { defineConfig } from '@playwright/test';
export default defineConfig({
testDir: '../../e2e',
workers: 1,
webServer: [
{
command:
'rm -f packages/backend/data/e2e.db data/e2e.db && DB_PATH=./data/e2e.db SMTP_HOST=localhost SMTP_PORT=1025 APP_URL=http://localhost:5173 npm -w @flashcard/backend run db:migrate && NODE_ENV=test DB_PATH=./data/e2e.db SMTP_HOST=localhost SMTP_PORT=1025 APP_URL=http://localhost:5173 npm -w @flashcard/backend run dev',
cwd: '../..',
port: 3000,
reuseExistingServer: false,
timeout: 60_000,
},
{
command: 'npm -w @flashcard/frontend run dev',
cwd: '../..',
port: 5173,
reuseExistingServer: false,
timeout: 60_000,
},
],
use: { baseURL: 'http://localhost:5173' },
timeout: 30_000,
});