kindergarten_java/reading-platform-frontend/playwright.config.ts
En 938503f2b8 chore: 更新启动脚本使用 Java (Spring Boot) 后端
- 修改后端目录从 reading-platform-backend 改为 reading-platform-java
- 修改后端端口从 3000 改为 8080
- 修改启动命令从 npm run start:dev 改为 mvn spring-boot:run
- 添加 JAVA_HOME 自动检测和设置(默认使用 /f/Java/jdk-17)
- 修改日志文件从 reading-platform-backend.log 改为 reading-platform-java.log
- 修改健康检查接口为 /actuator/health
- 增加启动等待超时时间到 60 秒(Java 启动较慢)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 10:35:30 +08:00

33 lines
628 B
TypeScript

import { defineConfig } from '@playwright/test';
export default defineConfig({
testDir: './tests/e2e',
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: 1,
reporter: 'html',
use: {
baseURL: 'http://localhost:5173',
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
},
projects: [
{
name: 'chromium',
use: {
channel: 'chrome',
},
},
],
webServer: {
command: 'npm run dev',
url: 'http://localhost:5173',
reuseExistingServer: true,
timeout: 120 * 1000,
},
});