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

View File

@@ -20,6 +20,7 @@
"zustand": "^4.5.0"
},
"devDependencies": {
"@playwright/test": "^1.60.0",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "^16.0.0",
"@types/canvas-confetti": "^1.6.0",

View File

@@ -0,0 +1,24 @@
import { defineConfig } from '@playwright/test';
export default defineConfig({
testDir: '../../e2e',
webServer: [
{
command:
'rm -f data/e2e.db && DB_PATH=./data/e2e.db npm -w @flashcard/backend run db:migrate && DB_PATH=./data/e2e.db 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,
});