- 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>
26 lines
995 B
TypeScript
26 lines
995 B
TypeScript
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,
|
||
},
|
||
});
|