Files
张翔 3244232be1 test(frontend): 添加API连通性和认证测试用例
- 添加API连通性测试
- 添加认证和授权测试
- 添加菜单管理测试
- 添加参数配置测试
- 添加字典管理测试
- 添加Playwright配置文件
2026-04-15 23:34:44 +08:00

57 lines
1.2 KiB
TypeScript

import { defineConfig, devices } from '@playwright/test';
const baseURL = 'http://localhost:3002';
export default defineConfig({
testDir: './e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: 0,
workers: 1,
reporter: 'list',
timeout: 30000,
expect: {
timeout: 10000,
},
use: {
baseURL: baseURL,
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'off',
actionTimeout: 10000,
navigationTimeout: 15000,
headless: true,
locale: 'zh-CN',
timezoneId: 'Asia/Shanghai',
ignoreHTTPSErrors: true,
bypassCSP: true,
viewport: { width: 1280, height: 720 },
},
projects: [
{
name: 'ui-test',
testMatch: '**/basic-ui-test.spec.ts',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'smoke-test',
testMatch: '**/smoke/**/*.spec.ts',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'journey-test',
testMatch: '**/journeys/**/*.spec.ts',
use: { ...devices['Desktop Chrome'] },
},
],
webServer: {
command: 'pnpm run dev',
url: baseURL,
reuseExistingServer: !process.env.CI,
timeout: 120000,
},
});