统一业务台账首屏设计(05-30-unified-page-design-review)

这个提交包含在:
2026-05-30 19:54:22 +08:00
父节点 8423ca63b5
当前提交 d5ef8189f1
共修改 15 个文件,包含 121 行新增和 446 行删除
+1 -1
查看文件
@@ -83,7 +83,7 @@ test("E2E 资产流转主链路:建卡→领用归还→调拨→盘点", asyn
await login(page, FINANCE_MGR);
await (await openNavLink(page, "资产")).click();
await expect(page.getByTestId("asset-registry-summary")).toBeVisible({ timeout: 30_000 });
await expect(page.getByRole("heading", { name: "资产台账" })).toBeVisible({ timeout: 30_000 });
await expect(page.getByTestId("asset-category-code")).toHaveCount(0);
await page.getByRole("button", { name: "台账工具" }).click();
await expect(page.getByTestId("asset-ledger-tools")).toBeVisible();
@@ -1085,10 +1085,10 @@ test("Wave3 PC 详情和通知中心视觉截图", async ({ page }) => {
await page.goto("/projects");
await expect(page.getByRole("heading", { name: "项目", exact: true })).toBeVisible();
await expect(page.getByText("默认只看我负责/我参与")).toBeVisible();
await expect(page.getByText("新建项目")).toHaveCount(0);
await expect(page.getByPlaceholder("搜索项目编号、项目名、客户名")).toBeVisible();
await expect(page.getByRole("button", { name: "创建项目" })).toHaveCount(0);
await page.getByRole("button", { name: "台账工具" }).click();
await expect(page.getByText("新建项目")).toBeVisible();
await expect(page.getByRole("button", { name: "创建项目" })).toBeVisible();
await page.goto("/projects/project-wave3");
await expect(page.getByRole("heading", { name: /HYB-W3/ })).toBeVisible();
@@ -1099,7 +1099,7 @@ test("Wave3 PC 详情和通知中心视觉截图", async ({ page }) => {
await page.goto("/contracts-registry?projectId=project-wave3");
await expect(page.getByRole("heading", { name: "合同台账", exact: true })).toBeVisible();
await expect(page.getByTestId("contracts-registry-summary")).toBeVisible();
await expect(page.getByTestId("contracts-registry-row")).toBeVisible();
await expect(page.getByRole("button", { name: "导出 CSV" })).toHaveCount(0);
await page.getByRole("button", { name: "台账工具" }).click();
await expect(page.getByTestId("contracts-ledger-tools")).toBeVisible();
@@ -1001,7 +1001,7 @@ async function capture(page: Page, name: string) {
const pages = [
{ path: "/payment-batches", summary: "payment-batches-summary", proof: "text=批次列表", screenshot: "01-payment-batches" },
{ path: "/ap-operations", summary: "ap-operations-summary", proof: "text=异常付款", screenshot: "02-ap-operations" },
{ path: "/ap-operations", proof: "text=异常付款", screenshot: "02-ap-operations", expectStatusStrip: false },
{ path: "/invoice-pool", summary: "invoice-pool-summary", proof: "data-testid=invoice-pool-table", screenshot: "03-invoice-pool" },
{ path: "/system/approval-rules", summary: "approval-rules-summary", proof: "data-testid=approval-rules-table", screenshot: "04-approval-rules" },
{ path: "/people", summary: "people-summary", proof: "data-testid=people-table", screenshot: "05-people" },
@@ -1023,9 +1023,13 @@ test("PC 财务与管理页 Wave4-5 视觉冒烟", async ({ page }) => {
for (const target of pages) {
await page.goto(target.path);
await expect(page.getByTestId(target.summary)).toBeVisible();
if ("summary" in target) {
await expect(page.getByTestId(target.summary)).toBeVisible();
}
await expect(page.locator(target.proof).first()).toBeVisible();
await expect(page.locator(".finance-status-strip").first()).toBeVisible();
if (!("expectStatusStrip" in target) || target.expectStatusStrip !== false) {
await expect(page.locator(".finance-status-strip").first()).toBeVisible();
}
await capture(page, target.screenshot);
}
});
+1 -1
查看文件
@@ -106,7 +106,7 @@ test("E2E 采购主链路:员工提单→经理审批→财务归档", async (
await page.getByRole("combobox").first().selectOption("approved");
const purchaseRow = page.getByRole("row").filter({ hasText: requestNo }).first();
await expect(purchaseRow).toBeVisible({ timeout: 30_000 });
await purchaseRow.click();
await purchaseRow.getByTestId("purchase-row-open").click();
await expect(page.getByTestId("purchase-archive-po-no")).toBeVisible();
await expect(page.getByTestId("purchase-status-hint")).toContainText("已通过", { timeout: 30_000 });
@@ -348,9 +348,9 @@ test.describe("R103 cross page UI consistency", () => {
await expect(page.locator("header").filter({ hasText: "业务" }).getByText("采购申请")).toBeVisible();
await expect(page.getByRole("heading", { name: "采购申请" })).toBeVisible();
await expect(page.getByTestId("purchase-task-card-draft")).toBeVisible();
await expect(page.getByTestId("purchase-requests-table")).toBeVisible();
await expect(page.getByTestId("purchase-ledger-tools")).toBeVisible();
await expect(page.getByTestId("purchase-row-next-step")).toContainText("继续完善材料并提交");
await expect(page.getByTestId("purchase-row-next-step")).toHaveCount(0);
await expect(page.getByText("付款处理")).toHaveCount(0);
await expect(page.getByText("/purchase-requests")).toHaveCount(0);
await expect(page.getByTestId("purchase-attachment-upload")).toHaveText("上传附件");