新增: playwright e2e 测试基建与 tauri 垫片

invoke 条件垫片使前端可在无 tauri 容器下直连 dev server 做端到端验证
This commit is contained in:
lxy
2026-10-01 02:41:21 +08:00
parent df3ed55d01
commit efdf1e0282
6 changed files with 452 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import { defineConfig } from 'playwright/test'
export default defineConfig({
testDir: 'tests/e2e',
timeout: 60_000,
headless: true,
// 单文件单用例,冒烟规模无需并行;减少并发也降低 vite 冷启动抖动导致的偶发失败
workers: 1,
retries: 0,
reporter: [['list']],
use: {
baseURL: 'http://localhost:1420',
headless: true,
},
webServer: {
command: 'npm run dev',
url: 'http://localhost:1420',
reuseExistingServer: true,
timeout: 120_000,
},
})