import { defineConfig, devices } from "@playwright/test"; /** * TEST_MODE=1 专用 E2E:注入 fixture → UI → 提交 MockTargetAPI。 * 需要本机 MySQL(docker compose up -d mysql)。 */ export default defineConfig({ testDir: "./tests/e2e", testMatch: "test-mode-pipeline.spec.ts", timeout: 90_000, use: { baseURL: "http://127.0.0.1:3110", trace: "on-first-retry", }, projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"] } }], webServer: { command: "pnpm exec next dev -p 3110", url: "http://127.0.0.1:3110", reuseExistingServer: false, timeout: 120_000, env: { ...process.env, TEST_MODE: "1", OCR_PROVIDER: "off", ENABLE_FORCE_IMPORT: "1", DATABASE_URL: process.env.DATABASE_URL || "mysql://app:app@localhost:7023/email_forecast", }, }, });