Some checks failed
Deploy / deploy (push) Has been cancelled
Full-stack web application for Telegram management - Frontend: Vue 3 + Vben Admin - Backend: NestJS - Features: User management, group broadcast, statistics 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
60 lines
1.3 KiB
JavaScript
60 lines
1.3 KiB
JavaScript
// playwright.config.js
|
|
const { defineConfig, devices } = require('@playwright/test');
|
|
|
|
module.exports = defineConfig({
|
|
testDir: './tests',
|
|
testMatch: '**/fixed-unified-register-test.js', // 只运行修复后的测试
|
|
fullyParallel: false, // 串行执行测试,避免并发问题
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 1,
|
|
workers: process.env.CI ? 1 : 1,
|
|
|
|
reporter: [
|
|
['html', { outputFolder: 'test-results/html-report' }],
|
|
['json', { outputFile: 'test-results/results.json' }],
|
|
['line']
|
|
],
|
|
|
|
use: {
|
|
baseURL: 'http://localhost:8890',
|
|
trace: 'on-first-retry',
|
|
screenshot: 'only-on-failure',
|
|
video: 'retain-on-failure',
|
|
actionTimeout: 10000,
|
|
navigationTimeout: 30000,
|
|
},
|
|
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
|
|
{
|
|
name: 'firefox',
|
|
use: { ...devices['Desktop Firefox'] },
|
|
},
|
|
|
|
{
|
|
name: 'webkit',
|
|
use: { ...devices['Desktop Safari'] },
|
|
},
|
|
|
|
// 移动设备测试
|
|
{
|
|
name: 'Mobile Chrome',
|
|
use: { ...devices['Pixel 5'] },
|
|
},
|
|
{
|
|
name: 'Mobile Safari',
|
|
use: { ...devices['iPhone 12'] },
|
|
},
|
|
],
|
|
|
|
webServer: {
|
|
command: 'npm run dev', // 启动开发服务器的命令
|
|
port: 8890,
|
|
timeout: 120 * 1000,
|
|
reuseExistingServer: !process.env.CI,
|
|
},
|
|
}); |