落地 synastry/star/ask API 与 H5 页面,补齐 cece-frontend-re complete-design 证据文档,并加入 Android 模拟器截图抓取脚本。 Co-authored-by: Cursor <cursoragent@cursor.com>
34 lines
936 B
TypeScript
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,
|
|
},
|
|
})
|