test(e2e): 人走五环浏览器全程点穿 Playwright spec(Task 24 UI 补全)

真实浏览器走完整链路:登录→设计中心+新建功能→建模器(标量+引用列OWNER→SYS_USER)
→选recipe→compile→发布→后端/api/menu断言新节点。专用配置反代8094(不碰dev 8093)。
本次实跑:1 passed。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-20 13:55:01 +08:00
parent a6bd4b0432
commit a6482b112e
2 changed files with 147 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
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.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,
},
});