import { defineConfig, devices } from '@playwright/test'; // ──────────────────────────────────────────────────────────────────────────── // AI recipe 渲染冒烟门专属配置(M-Gate 可执行化)。 // // 与默认 playwright.config.ts 的区别(关键): // - 复用【已在跑】的 5174 dev server,不自拉 webServer(不重启任何服务)。 // - 仅匹配 recipe-render-smoke.spec.ts。 // // 一键跑(含生成/清理):见 recipe-render-smoke.sh // 单跑某页:RECIPE_SMOKE_TEMPLATE= npx playwright test --config=playwright.recipe-smoke.config.ts // 前置:localhost:5174(前端 dev)+ localhost:8093(后端 dev/eip4dev)。 // ──────────────────────────────────────────────────────────────────────────── export default defineConfig({ testDir: './e2e', testMatch: /recipe-render-smoke\.spec\.ts/, fullyParallel: false, workers: 1, timeout: 90_000, reporter: [['list']], outputDir: './e2e/artifacts/recipe-render-smoke/_pw-output', use: { baseURL: 'http://localhost:5174', trace: 'retain-on-failure', screenshot: 'only-on-failure', video: 'off', }, projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }], // 故意不配置 webServer —— 复用已在跑的 5174,不重启。 });