- 修复LoginPage/SurgeryBillingPage/DoctorStationPage中page变量作用域问题 - 新增根目录playwright.config.ts(解决配置加载问题) - .gitignore添加test-results和report目录排除
29 lines
789 B
TypeScript
29 lines
789 B
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
export default defineConfig({
|
|
testDir: './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'] } },
|
|
],
|
|
});
|