import { defineConfig, devices } from '@playwright/test'; // 人走五环 UI 点穿 e2e 专用配置:webServer 反代到 8094(含本特性新代码), // 与默认 playwright.config.ts(反代 8093 dev)隔离,不影响你正在跑的 8093。 // 先单独启动 8094 后端,再 `npx playwright test -c playwright.fivering.config.ts`。 export default defineConfig({ testDir: './e2e', testMatch: /(five-ring|master-detail)\.spec\.ts/, fullyParallel: false, workers: 1, timeout: 120_000, reporter: [['list']], use: { baseURL: 'http://localhost:5174', trace: 'off', screenshot: 'only-on-failure', }, projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }], webServer: { command: 'NODE_OPTIONS=--max-http-header-size=65536 VITE_BACKEND_TARGET=http://localhost:8094 npx vite --port 5174 --strictPort', url: 'http://localhost:5174', reuseExistingServer: false, timeout: 120_000, }, });