后端: - 新增 leai 模块:认证、Webhook、数据同步、定时对账 - 新增 LeaiConfig/RestTemplateConfig/SchedulingConfig 配置 - 新增 FlywayRepairConfig 处理迁移修复 - 新增 V5__leai_integration.sql 迁移脚本 - 扩展所有实体类添加 tenantId 等字段 - 更新 SecurityConfig 放行 leai 公开接口 - 添加 application-test.yml 测试环境配置 前端: - 添加乐读派认证 API (public.ts) - 优化 Generating.vue 生成页 - 添加 Playwright E2E 测试配置及依赖 - 添加测试 fixtures、utils、mock-h5.html - 添加 leai 模块完整 E2E 测试套件 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
42 lines
914 B
TypeScript
42 lines
914 B
TypeScript
import { defineConfig, devices } from '@playwright/test'
|
|
|
|
/**
|
|
* Playwright E2E 测试配置
|
|
* 乐读派 AI 绘本创作集成测试
|
|
*/
|
|
export default defineConfig({
|
|
testDir: './e2e',
|
|
/* 测试超时 */
|
|
timeout: 30_000,
|
|
expect: {
|
|
timeout: 10_000,
|
|
},
|
|
/* 并行执行 */
|
|
fullyParallel: true,
|
|
/* CI 环境重试 */
|
|
retries: process.env.CI ? 2 : 0,
|
|
/* 报告 */
|
|
reporter: [['html', { open: 'never' }], ['list']],
|
|
/* 全局配置 */
|
|
use: {
|
|
baseURL: process.env.FRONTEND_URL || 'http://localhost:3000',
|
|
trace: 'on-first-retry',
|
|
screenshot: 'only-on-failure',
|
|
actionTimeout: 10_000,
|
|
},
|
|
/* 浏览器项目 */
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
],
|
|
/* 本地开发服务器 */
|
|
webServer: {
|
|
command: 'npm run dev',
|
|
port: 3000,
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 30_000,
|
|
},
|
|
})
|