feat: E2E 测试集成真实后端
- Playwright 双 webServer 模式自动启动 Go 后端 + Vite 前端 - 后端使用临时 SQLite 数据库隔离,固定端口 19026 - vite.config.ts proxy target 动态读取环境变量 - 新增 sql.js 依赖用于 SQLite 统计数据 seed - 新增 e2e/fixtures.ts 共享工具模块(API seed + SQLite seed) - 拆分测试文件 5→7(providers/models/stats/navigation/validation) - 删除旧文件 crud.spec.ts/sidebar.spec.ts/stats-cards.spec.ts - E2E 测试尚有部分用例需调试修复
This commit is contained in:
10
frontend/e2e/global-setup.ts
Normal file
10
frontend/e2e/global-setup.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import fs from 'node:fs'
|
||||
|
||||
async function globalSetup() {
|
||||
const tempDir = process.env.NEX_E2E_TEMP_DIR
|
||||
if (tempDir && fs.existsSync(tempDir)) {
|
||||
console.log(`E2E temp dir: ${tempDir}`)
|
||||
}
|
||||
}
|
||||
|
||||
export default globalSetup
|
||||
Reference in New Issue
Block a user