- Add Playwright (Chromium) for E2E tests with webServer auto-start - Add Vitest + @testing-library/react + coverage-v8 with 80% threshold - Add smoke E2E spec and jest-dom setup file - Update turbo.json with test:e2e task - Enforce 80% coverage rule in AGENTS.md (global testing policy) - Add full Testes section to docs/conventions/frontend.md - Add tasks.md for scenario-creator feature (14 tasks, T01–T14) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
32 lines
706 B
TypeScript
32 lines
706 B
TypeScript
import { defineConfig, devices } from '@playwright/test'
|
|
|
|
export default defineConfig({
|
|
testDir: './e2e',
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: process.env.CI ? 1 : undefined,
|
|
reporter: process.env.CI ? 'github' : 'list',
|
|
|
|
use: {
|
|
baseURL: 'http://localhost:5173',
|
|
trace: 'on-first-retry',
|
|
screenshot: 'only-on-failure',
|
|
},
|
|
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
],
|
|
|
|
// Start the Vite dev server before running tests
|
|
webServer: {
|
|
command: 'pnpm dev',
|
|
url: 'http://localhost:5173',
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 30_000,
|
|
},
|
|
})
|