-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
31 lines (30 loc) · 1.03 KB
/
Copy pathplaywright.config.ts
File metadata and controls
31 lines (30 loc) · 1.03 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
import { defineConfig, devices } from '@playwright/test'
/**
* E2E는 프로덕션 빌드(vite preview)를 대상으로 돈다 — 서비스 워커와 base 경로
* ('/scripture-memory/')가 개발 서버와 다르기 때문에, 오프라인·PWA 검증은
* 빌드 결과에서만 의미가 있다.
*/
export default defineConfig({
testDir: './e2e',
fullyParallel: false,
workers: 1,
reporter: [['list']],
timeout: 60_000,
use: {
baseURL: 'http://localhost:4173',
...devices['Desktop Chrome'],
// 서비스 워커를 쓰므로 컨텍스트를 격리해 캐시가 섞이지 않게 한다
serviceWorkers: 'allow',
},
projects: [
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
// 모바일 터치 타깃과 하단 탭 확인용
{ name: 'mobile', use: { ...devices['Pixel 7'] } },
],
webServer: {
command: 'npm run build && npm run preview -- --port 4173 --strictPort',
url: 'http://localhost:4173/scripture-memory/',
reuseExistingServer: false,
timeout: 120_000,
},
})