Component evidence
Configures Playwright E2E tests with parallel execution and dev server management.
// Source: https://github.com/joey-zhou/xiaozhi-esp32-server-java | License: MIT | Copyright 2025 joey
// Provided via justclaw.it.com; keep this notice with the code.
import { defineConfig, devices } from '@playwright/test'
/**
* Playwright E2E 测试配置
* @see https://playwright.dev/docs/test-configuration
*/
export default defineConfig({
testDir: './e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: 'html',
use: {
baseURL: 'http://localhost:8084',
trace: 'on-first-retry',
screenshot: 'only-on-failure',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
/* 启动前端开发服务器 */
webServer: {
command: 'npm run dev',
url
... (truncated -- full source via MCP)