Files
eip4-web/playwright.config.ts
zhengwr 1b37c83044 F2-2: 新增 crud-write E2E spec + 修复大 header 限制 + 清理 unused-var
- e2e/crud-write.spec.ts:F2-2 写路径端到端测试(amis form 提交→save→
  psql落库→delete清理;权限负例 403 验证)
- playwright.config.ts:webServer command 加 NODE_OPTIONS=--max-http-header-size=65536,
  解决 ceshi 用户 JWT token ~17KB 超过 Node http 默认限制导致 431 错误
- 修复 crud-write.spec.ts 3 个 TS unused-var(BACKEND/resp/count)
- 更新 e2e artifacts + screenshots(本次跑测产物)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 22:01:18 +08:00

26 lines
995 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { defineConfig, devices } from '@playwright/test';
// F1-4 端到端:schema 全量抽样渲染 + P4-5 改写后脚本挂回 onEvent 重放。
// dev server 由 webServer 拉起;/api 经 vite proxy 反代到后端 8093(dev profile)。
export default defineConfig({
testDir: './e2e',
fullyParallel: false,
workers: 1,
timeout: 60_000,
reporter: [['list']],
use: {
baseURL: 'http://localhost:5174',
trace: 'off',
screenshot: 'only-on-failure',
},
projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
webServer: {
// 后端统一反代到 8093(dev profile,含所有端点:auth/menu/schema/script/entity)
// NODE_OPTIONS 放大 Node http 默认 16KB header 限制(ceshi token ~17KB)
command: 'NODE_OPTIONS=--max-http-header-size=65536 VITE_BACKEND_TARGET=http://localhost:8093 npx vite --port 5174 --strictPort',
url: 'http://localhost:5174',
reuseExistingServer: false,
timeout: 120_000,
},
});