-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
33 lines (31 loc) · 1.21 KB
/
Copy pathplaywright.config.ts
File metadata and controls
33 lines (31 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/// <reference types="node" />
import { defineConfig, devices } from '@playwright/test';
/**
* M7 검증용 브라우저 e2e — vitest(node, DOM 없음)가 못 하는 것을 담당:
* 반응형 320/375/414/768px · Dialog DOM 동작 · axe-core 접근성 정적 감사.
* `npm test`(기존 80 단위테스트)와 분리 — `npm run test:e2e` 로만 실행.
* 웹서버는 프로덕션 빌드(`vite preview`)를 띄워 실제 배포물을 검증한다.
*/
const PORT = 4173;
const BASE_PATH = '/mathemagics-interactive/';
export default defineConfig({
testDir: './e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 1 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: [['list'], ['html', { outputFolder: 'e2e/report', open: 'never' }]],
outputDir: 'e2e/test-results',
use: {
baseURL: `http://localhost:${PORT}${BASE_PATH}`,
trace: 'on-first-retry',
screenshot: 'only-on-failure'
},
projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
webServer: {
command: 'npm run build && npx vite preview --port 4173 --strictPort',
url: `http://localhost:${PORT}${BASE_PATH}`,
reuseExistingServer: !process.env.CI,
timeout: 120_000
}
});