- 重写LoginPage,修复登录状态清除和跳转等待逻辑 - 新增workflow-full.spec.ts覆盖20个核心页面 - 修复login.spec.ts密码可见性测试placeholder不匹配 - 所有导航超时增至60秒,适配重页面加载 - 已验证通过: 登录4/4 + 全流程20/20 = 24/24
30 lines
896 B
TypeScript
Executable File
30 lines
896 B
TypeScript
Executable File
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
export default defineConfig({
|
|
testDir: './tests/e2e/specs',
|
|
fullyParallel: false, // 改为串行避免session冲突
|
|
timeout: 60_000,
|
|
expect: { timeout: 10_000 },
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: 1, // 单worker避免并发登录冲突
|
|
reporter: [
|
|
['html', { outputFolder: 'tests/e2e/report', open: 'never' }],
|
|
['list'],
|
|
],
|
|
use: {
|
|
baseURL: process.env.TEST_BASE_URL || 'http://localhost:81',
|
|
screenshot: 'only-on-failure',
|
|
video: 'retain-on-failure',
|
|
trace: 'retain-on-failure',
|
|
viewport: { width: 1920, height: 1080 },
|
|
locale: 'zh-CN',
|
|
timezoneId: 'Asia/Shanghai',
|
|
actionTimeout: 15_000,
|
|
navigationTimeout: 30_000,
|
|
storageState: undefined, // 不使用持久化状态
|
|
},
|
|
projects: [
|
|
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
|
|
],
|
|
});
|