修正 ERP 边界与资产页面一致性(05-30-fix-erp-boundary-asset-consistency)

这个提交包含在:
2026-05-30 23:06:02 +08:00
父节点 16fd9bdf52
当前提交 f299ceeb74
共修改 47 个文件,包含 476 行新增和 1633 行删除
+8 -4
查看文件
@@ -7,7 +7,8 @@ import { EMPLOYEE, FINANCE, login, type E2EUser } from "./helpers/auth";
const ADMIN: E2EUser = {
identifier: "[email protected]",
password: "AdminPassword1234",
name: "Admin",
name: "王顺利",
employeeNo: "HYD000006",
};
const SCREENSHOT_DIR = path.resolve(process.cwd(), "../output/playwright/portal-task-first-redesign");
@@ -25,9 +26,10 @@ function envelope<T>(data: T) {
}
function portalPayload(mode: "employee" | "admin" | "finance") {
const displayName = mode === "employee" ? "陈工程" : mode === "finance" ? "赵财务" : "王顺利";
const base = {
workspace: { id: "workspace-visual", persisted: true, profile: "small_team_internal" },
greeting: { name: mode === "employee" ? "Employee" : mode === "finance" ? "Finance" : "Admin" },
greeting: { name: displayName },
myApplications: [{ domain: "reimbursement", count: 1, href: "/reimbursements" }],
riskSummary: null,
announcements: [],
@@ -134,13 +136,15 @@ async function mockVisualPortal(page: Page, mode: "employee" | "admin" | "financ
return;
}
if (pathName === "/api/me") {
const displayName = mode === "employee" ? "陈工程" : mode === "finance" ? "赵财务" : "王顺利";
const employeeNo = mode === "employee" ? "HYD000003" : mode === "finance" ? "HYD000004" : "HYD000006";
await route.fulfill({
status: 200,
contentType: "application/json",
body: JSON.stringify(envelope({
id: `visual-${mode}`,
employeeNo: "VISUAL",
name: mode === "employee" ? "Employee" : mode === "finance" ? "Finance" : "Admin",
employeeNo,
name: displayName,
email: `${mode}@hyinda.com`,
roleCodes: mode === "employee" ? ["employee"] : mode === "finance" ? ["finance"] : ["admin"],
notificationPushEnabled: true,