Files
jackyu66gitandCursor b7b0b18802 fix(db): 重编号合并后撞号 migration,并修 admin e2e base
将 015–023 双文件冲突线性化为 015–050;提供已有库 schema_migrations 修复脚本;admin Playwright 对齐 /psy/admin/ 预览路径。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-13 02:14:52 +08:00

34 lines
966 B
TypeScript

import { defineConfig, devices } from '@playwright/test'
/**
* Ops admin L3 smoke: Vite preview + mocked /api/v1/admin (no Go required).
* Build uses base `/psy/admin/` — baseURL must include that prefix.
* Run: npm run test:e2e -w @yuxingu/admin-h5
*/
export default defineConfig({
testDir: './e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 1 : 0,
use: {
// Trailing slash so relative goto('login') resolves under /psy/admin/
baseURL: 'http://127.0.0.1:4174/psy/admin/',
trace: 'on-first-retry',
},
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
...(process.env.PW_CHANNEL ? { channel: process.env.PW_CHANNEL } : {}),
},
},
],
webServer: {
command: 'npm run build && npm run preview -- --host 127.0.0.1 --port 4174',
url: 'http://127.0.0.1:4174/psy/admin/',
reuseExistingServer: false,
timeout: 120_000,
},
})