Files
eip4-web/playwright.notice-ceshi-menu.config.ts
zhengwr b7cba058d5 e2e: 通知页强断言用例(组件真实性 + ceshi 菜单端到端)
notice-reality:分页真换页/过滤共存/人员列姓名/富文本编辑器渲染/单确认/查看只读
逐条强断言(取代"弹窗能开=通过"的弱断言);notice-ceshi-menu:ceshi 真实登录从
菜单进通知管理端到端。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 13:54:22 +08:00

35 lines
1.9 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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,不重启。
});