Files
zclaw_openfang/admin-v2/playwright.config.ts
iven 2e70e1a3f8
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
test: add 30 smoke tests for break detection across SaaS/Admin/Desktop
Layer 1 断裂探测矩阵:
- S1-S6: SaaS API 端到端 (auth/lockout/relay/permissions/billing/knowledge)
- A1-A6: Admin V2 连通性 (login/dashboard/CRUD/knowledge/roles/models)
- D1-D6: Desktop 聊天流 (gateway/kernel/relay/cancel/offline/error)
- F1-F6: Desktop 功能闭环 (agent/hands/pipeline/memory/butler/skills)
- X1-X6: 跨系统闭环 (provider→desktop/disabled user/knowledge/stats/totp/billing)

Also adds: admin-v2 Playwright config, updated spec doc with cross-reference

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 09:47:35 +08:00

51 lines
1.2 KiB
TypeScript

import { defineConfig, devices } from '@playwright/test';
/**
* Admin V2 E2E 测试配置
*
* 断裂探测冒烟测试 — 验证 Admin V2 页面与 SaaS 后端的连通性
*
* 前提条件:
* - SaaS Server 运行在 http://localhost:8080
* - Admin V2 dev server 运行在 http://localhost:5173
* - 数据库有种子数据 (super_admin: testadmin/Admin123456)
*/
export default defineConfig({
testDir: './tests/e2e',
timeout: 60000,
expect: {
timeout: 10000,
},
fullyParallel: false,
retries: 0,
workers: 1,
reporter: [
['list'],
['html', { outputFolder: 'test-results/html-report' }],
],
use: {
baseURL: 'http://localhost:5173',
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
actionTimeout: 10000,
navigationTimeout: 30000,
},
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
viewport: { width: 1280, height: 720 },
},
},
],
webServer: {
command: 'pnpm dev --port 5173',
url: 'http://localhost:5173',
reuseExistingServer: true,
timeout: 30000,
},
outputDir: 'test-results/artifacts',
});