104ae78a2b
- 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 确认点击 - 复习页面入口检查新增回忆复习按钮的文本变化适配
30 lines
607 B
TypeScript
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,
|
|
},
|
|
});
|