Files
erp/apps/web/playwright.config.ts
iven 790991f77c
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
test: E2E auth fixture 修复 + Workflow 集成测试
- E2E: 用 addInitScript 替代 goto+evaluate 注入 localStorage,
  解决 Zustand store 初始化时序问题 (10/10 通过)
- E2E: 修复 Modal 按钮选择器 (OK/Cancel 替代中文)
- E2E: Playwright 配置对齐端口 5174
- 集成测试: 新增 workflow_tests 模块 (4 个测试)
2026-04-18 08:40:33 +08:00

29 lines
569 B
TypeScript

import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './e2e',
timeout: 30000,
retries: 1,
fullyParallel: true,
forbidOnly: !!process.env.CI,
reporter: 'html',
use: {
baseURL: 'http://localhost:5174',
headless: true,
screenshot: 'only-on-failure',
trace: 'on-first-retry',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
webServer: {
command: 'pnpm dev',
port: 5174,
reuseExistingServer: true,
timeout: 30000,
},
});