import { defineConfig, devices } from '@playwright/test'; // ──────────────────────────────────────────────────────────────────────────── // 通知管理「真·端到端菜单导航」E2E 专属配置(ceshi 账号) // // 与 notice-reality 的关键区别: // - 不注入 token、不直连 /page/:id —— 必须走【真实 UI 表单登录 + 从菜单点进去】, // 验证此前一直被绕过的「菜单导航」环节。 // - baseURL 指向【已在跑】的 5173 dev server,不自拉 webServer(环境都在跑,勿重启)。 // - screenshot:'on' ⇒ 每步留证(artifacts/notice-ceshi-menu/)。 // - 仅匹配 notice-ceshi-menu.spec.ts。 // // 运行:npx playwright test --config=playwright.notice-ceshi-menu.config.ts // 前置:localhost:5173(前端 dev)+ localhost:8093(后端 dev/eip4dev)+ psql:5433。 // 账号 ceshi/111111(多角色,可见「信息站 > 通知管理」菜单;admin 看不到)。 // ──────────────────────────────────────────────────────────────────────────── export default defineConfig({ testDir: './e2e', testMatch: /notice-ceshi-menu\.spec\.ts/, fullyParallel: false, workers: 1, timeout: 120_000, reporter: [['list']], outputDir: './e2e/artifacts/notice-ceshi-menu/_pw-output', use: { baseURL: 'http://localhost:5173', trace: 'retain-on-failure', screenshot: 'on', video: 'off', viewport: { width: 1440, height: 900 }, }, projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }], // 注意:故意不配置 webServer —— 复用已在跑的 5173,不重启。 });