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