fix(db): 重编号合并后撞号 migration,并修 admin e2e base
将 015–023 双文件冲突线性化为 015–050;提供已有库 schema_migrations 修复脚本;admin Playwright 对齐 /psy/admin/ 预览路径。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -161,7 +161,8 @@ test('admin login users grant and audit with mocked API', async ({ page }) => {
|
||||
await ok({})
|
||||
})
|
||||
|
||||
await page.goto('/login')
|
||||
// Leading `/login` would resolve to host root and miss Vite base `/psy/admin/`.
|
||||
await page.goto('login')
|
||||
await expect(page.getByRole('heading', { name: '愈心谷' })).toBeVisible()
|
||||
await page.locator('input[type="password"]').fill('change-me')
|
||||
await page.getByRole('button', { name: '登录' }).click()
|
||||
|
||||
@@ -2,6 +2,7 @@ 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({
|
||||
@@ -10,7 +11,8 @@ export default defineConfig({
|
||||
forbidOnly: !!process.env.CI,
|
||||
retries: process.env.CI ? 1 : 0,
|
||||
use: {
|
||||
baseURL: 'http://127.0.0.1:4174',
|
||||
// Trailing slash so relative goto('login') resolves under /psy/admin/
|
||||
baseURL: 'http://127.0.0.1:4174/psy/admin/',
|
||||
trace: 'on-first-retry',
|
||||
},
|
||||
projects: [
|
||||
@@ -24,7 +26,7 @@ export default defineConfig({
|
||||
],
|
||||
webServer: {
|
||||
command: 'npm run build && npm run preview -- --host 127.0.0.1 --port 4174',
|
||||
url: 'http://127.0.0.1:4174',
|
||||
url: 'http://127.0.0.1:4174/psy/admin/',
|
||||
reuseExistingServer: false,
|
||||
timeout: 120_000,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user