Files
digital-psychology/apps/admin-h5/playwright.config.ts
T
jackyu66gitandCursor 7e9023f0a8
ci / h5 (push) Canceled after 0s
ci / api (push) Canceled after 0s
ci / ess-docs (push) Canceled after 0s
test(e2e): 前后台联调 Playwright 与 admin 冒烟
新增 e2e-live 真 API 一致性全路径,并为 admin-h5 增加 mock 浏览器冒烟。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 22:41:43 +08:00

32 lines
798 B
TypeScript

import { defineConfig, devices } from '@playwright/test'
/**
* Ops admin L3 smoke: Vite preview + mocked /api/v1/admin (no Go required).
* 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: {
baseURL: 'http://127.0.0.1:4174',
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',
reuseExistingServer: false,
timeout: 120_000,
},
})