Files
digital-psychology/apps/user-h5/playwright.config.ts
T
jackyu66gitandCursor bd22d9dddd feat: P1 合盘/星座/问答与测测完整设计包及模拟器取证工具
落地 synastry/star/ask API 与 H5 页面,补齐 cece-frontend-re complete-design 证据文档,并加入 Android 模拟器截图抓取脚本。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 11:37:53 +08:00

34 lines
936 B
TypeScript

import { defineConfig, devices } from '@playwright/test'
/**
* L3 smoke: Vite preview + network-mocked API (no Go required).
* Run: npm run test:e2e -w @yuxingu/user-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:4173',
trace: 'on-first-retry',
},
projects: [
{
name: 'chromium',
use: {
...devices['Pixel 7'],
// Optional: PW_CHANNEL=chrome 改用系统 Chrome
...(process.env.PW_CHANNEL ? { channel: process.env.PW_CHANNEL } : {}),
},
},
],
webServer: {
// Always rebuild so new routes/pages are in dist (reuseExistingServer can hide stale builds).
command: 'npm run build && npm run preview -- --host 127.0.0.1 --port 4173',
url: 'http://127.0.0.1:4173',
reuseExistingServer: false,
timeout: 120_000,
},
})