Files
lpt-fe/playwright.config.ts
T
cat-shark 104ae78a2b test(e2e):修复 10 个用例——全部 30 个通过
- study.spec.ts:mock 模式 **/api/tasks** 过滤 .ts 模块请求,避免拦截 Vite 文件加载
- navigation.spec.ts:同上
- start-task.spec.ts:addInitScript mock HTMLAudioElement.play 绕过音频权限弹窗
- start-task.spec.ts:补健结束会话后的 ElMessageBox.confirm 确认点击
- 复习页面入口检查新增回忆复习按钮的文本变化适配
2026-07-04 09:28:15 +08:00

30 lines
607 B
TypeScript

import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './e2e',
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: 1,
reporter: 'list',
use: {
baseURL: 'http://localhost:5158',
trace: 'on-first-retry',
},
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
channel: 'chrome',
},
},
],
webServer: {
command: 'npm run dev',
url: 'http://localhost:5158',
reuseExistingServer: !process.env.CI,
timeout: 30_000,
},
});