- 修复: Vue 版本降级至 3.4.21 以兼容 uni-app v3 alpha - 修复: 稳定性测试改用绝对时间阈值,消除 flaky 退化率检测 - 修复: 配置 Vite 使用 sass-embedded 消除 Dart Sass 遗留 API 警告 - 修复: 启用 Playwright webServer 配置,支持自动启动开发服务器 - 清理: 移除未使用的 @dcloudio/uni-ui 依赖 - 新增: 添加 @dcloudio/uni-mp-weixin 平台依赖支持微信小程序构建
45 lines
1.0 KiB
TypeScript
45 lines
1.0 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test'
|
|
|
|
export default defineConfig({
|
|
testDir: './e2e',
|
|
testIgnore: ['**/mobile/**', '**/miniprogram/**', '**/pages/**', '**/performance/**'],
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: process.env.CI ? 1 : undefined,
|
|
reporter: 'html',
|
|
use: {
|
|
baseURL: 'http://localhost:5173',
|
|
trace: 'on-first-retry',
|
|
screenshot: 'only-on-failure',
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
{
|
|
name: 'Mobile Chrome',
|
|
use: { ...devices['Pixel 5'] },
|
|
},
|
|
{
|
|
name: 'Mobile Safari',
|
|
use: { ...devices['iPhone 13'] },
|
|
},
|
|
{
|
|
name: 'firefox',
|
|
use: { ...devices['Desktop Firefox'] },
|
|
},
|
|
{
|
|
name: 'webkit',
|
|
use: { ...devices['Desktop Safari'] },
|
|
},
|
|
],
|
|
webServer: {
|
|
command: 'npm run dev:h5',
|
|
url: 'http://localhost:5173',
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 120 * 1000,
|
|
},
|
|
})
|