- 新增页面对象: SurgeryBillingPage, DoctorStationPage - 新增测试用例: 手术计费防重复(#437), 签发耗材验证(#443), 并发操作测试 - 增强登录测试: 多场景覆盖 - 完善测试数据工具: 支持多角色用户配置 - 清理冗余备份文件
41 lines
1.3 KiB
TypeScript
41 lines
1.3 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
/**
|
|
* OpenHIS Playwright E2E 测试配置 v2.0
|
|
*
|
|
* 运行命令:
|
|
* npx playwright test # 全部测试
|
|
* npx playwright test --project=chromium # 仅Chrome
|
|
* npx playwright test login # 仅登录测试
|
|
* npx playwright test --ui # UI交互模式
|
|
* npx playwright test --headed # 有头模式(可视化)
|
|
* npx playwright test --tags=@smoke # 仅冒烟测试
|
|
*/
|
|
export default defineConfig({
|
|
testDir: './tests/e2e/specs',
|
|
fullyParallel: true,
|
|
timeout: 60_000,
|
|
expect: { timeout: 10_000 },
|
|
retries: process.env.CI ? 2 : 1,
|
|
workers: process.env.CI ? 2 : undefined,
|
|
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,
|
|
},
|
|
projects: [
|
|
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
|
|
{ name: 'firefox', use: { ...devices['Desktop Firefox'] } },
|
|
],
|
|
});
|