From 1f13dd9c802745a47e6757c349fdace879c871af Mon Sep 17 00:00:00 2001 From: shunli Date: Thu, 28 May 2026 23:16:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=89=8D=E7=AB=AF=E9=87=8D?= =?UTF-8?q?=E6=9E=84=E5=90=8E=E7=9A=84=E8=A7=86=E8=A7=89=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E5=9F=BA=E7=BA=BF=EF=BC=8805-28-frontend-ux-redesign=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/tests/e2e/helpers/navigation.ts | 2 +- client/tests/e2e/helpers/pageObjects/AppShell.ts | 2 +- client/tests/e2e/helpers/smokeAssertions.ts | 4 ++-- client/tests/e2e/project-wide-visual.spec.ts | 2 +- client/tests/e2e/r103-cross-page-ui-consistency.spec.ts | 4 ++-- client/tests/e2e/visual-shell.spec.ts | 8 ++++---- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/client/tests/e2e/helpers/navigation.ts b/client/tests/e2e/helpers/navigation.ts index fd3a4d6d..307fc01e 100644 --- a/client/tests/e2e/helpers/navigation.ts +++ b/client/tests/e2e/helpers/navigation.ts @@ -3,7 +3,7 @@ import { expect, type Locator, type Page } from "@playwright/test"; import { TEST_IDS } from "./testIds"; export async function openBackupModulesIfNeeded(page: Page) { - const summary = page.locator("summary").filter({ hasText: "备用模块" }).first(); + const summary = page.locator("summary").filter({ hasText: "更多" }).first(); if (await summary.count()) { const details = summary.locator("xpath=ancestor::details[1]"); const isOpen = await details.evaluate((node) => (node as HTMLDetailsElement).open); diff --git a/client/tests/e2e/helpers/pageObjects/AppShell.ts b/client/tests/e2e/helpers/pageObjects/AppShell.ts index d231c73c..3d7cdc32 100644 --- a/client/tests/e2e/helpers/pageObjects/AppShell.ts +++ b/client/tests/e2e/helpers/pageObjects/AppShell.ts @@ -36,7 +36,7 @@ export class AppShell { } async assertBackupModulesCollapsed() { - const summary = this.page.locator("summary").filter({ hasText: "备用模块" }).first(); + const summary = this.page.locator("summary").filter({ hasText: "更多" }).first(); if (await summary.count()) { const details = summary.locator("xpath=ancestor::details[1]"); await expect(details).not.toHaveAttribute("open", ""); diff --git a/client/tests/e2e/helpers/smokeAssertions.ts b/client/tests/e2e/helpers/smokeAssertions.ts index 7214ae73..402cdf02 100644 --- a/client/tests/e2e/helpers/smokeAssertions.ts +++ b/client/tests/e2e/helpers/smokeAssertions.ts @@ -39,12 +39,12 @@ export async function assertMainNavVisible(page: Page) { } export async function assertBackupModulesCollapsed(page: Page) { - const summary = page.locator("summary").filter({ hasText: "备用模块" }).first(); + const summary = page.locator("summary").filter({ hasText: "更多" }).first(); await expect(summary).toBeVisible(); const details = summary.locator("xpath=ancestor::details[1]"); const isOpen = await details.evaluate((node) => (node as HTMLDetailsElement).open); expect(isOpen).toBe(false); - await expect(page.getByRole("link", { name: "采购申请" })).not.toBeVisible(); + await expect(page.getByRole("link", { name: "差旅申请" })).not.toBeVisible(); } export async function assertWecomBindingCardVisible(page: Page) { diff --git a/client/tests/e2e/project-wide-visual.spec.ts b/client/tests/e2e/project-wide-visual.spec.ts index 3a8abd8d..b5b29cfc 100644 --- a/client/tests/e2e/project-wide-visual.spec.ts +++ b/client/tests/e2e/project-wide-visual.spec.ts @@ -248,7 +248,7 @@ async function auditPage(page: Page, input: { const sidebarLike = Array.from(document.querySelectorAll("aside, nav")).filter((element) => { const rect = element.getBoundingClientRect(); const textContent = element.textContent ?? ""; - return rect.width > 160 && textContent.includes("备用模块"); + return rect.width > 160 && textContent.includes("更多"); }).length; const clipped = Array.from(document.querySelectorAll("button,a,[role='button'],select,input,textarea,[data-testid]")) .filter((element) => { diff --git a/client/tests/e2e/r103-cross-page-ui-consistency.spec.ts b/client/tests/e2e/r103-cross-page-ui-consistency.spec.ts index bb52e70c..640bde53 100644 --- a/client/tests/e2e/r103-cross-page-ui-consistency.spec.ts +++ b/client/tests/e2e/r103-cross-page-ui-consistency.spec.ts @@ -343,7 +343,7 @@ test.describe("R103 cross page UI consistency", () => { await page.setViewportSize({ width: 1440, height: 960 }); await page.goto(`/purchase-requests?id=${purchaseId}`); - await expect(page.locator("header").filter({ hasText: "备用模块" }).getByText("采购申请")).toBeVisible(); + await expect(page.locator("header").filter({ hasText: "业务" }).getByText("采购申请")).toBeVisible(); await expect(page.getByRole("heading", { name: "采购申请" })).toBeVisible(); await expect(page.getByText("/purchase-requests")).toHaveCount(0); await expect(page.getByTestId("purchase-attachment-upload")).toHaveText("上传附件"); @@ -362,7 +362,7 @@ test.describe("R103 cross page UI consistency", () => { await page.setViewportSize({ width: 1440, height: 960 }); await page.goto("/invoice-pool"); - await expect(page.locator("header").filter({ hasText: "备用模块" }).getByText("票据中心")).toBeVisible(); + await expect(page.locator("header").filter({ hasText: "财务" }).getByText("票据中心")).toBeVisible(); await expect(page.getByTestId("invoice-bind-reimbursement")).toContainText("草稿单 · 2026-05-06"); await expect(page.getByTestId("invoice-bind-reimbursement")).not.toContainText(reimbursementId); await expect(page.getByText("/invoice-pool")).toHaveCount(0); diff --git a/client/tests/e2e/visual-shell.spec.ts b/client/tests/e2e/visual-shell.spec.ts index 3d22bf18..ad2f36a0 100644 --- a/client/tests/e2e/visual-shell.spec.ts +++ b/client/tests/e2e/visual-shell.spec.ts @@ -310,7 +310,7 @@ test.describe("visual shell", () => { await page.goto("/login"); await expect(page.getByText("海音达工作台").first()).toBeVisible(); - await expect(page.getByRole("heading", { name: "登录工作台" })).toBeVisible(); + await expect(page.getByRole("heading", { name: "海音达 OA" })).toBeVisible(); await expect(page.getByTestId("login-password-primary-panel")).toBeVisible(); await attachScreenshot(page, testInfo, "login-shell.png"); @@ -324,7 +324,7 @@ test.describe("visual shell", () => { await expect(page.locator("aside")).toBeVisible(); await expect(page.getByTestId("topbar-profile-trigger")).toBeVisible(); await expect(page.locator("aside").getByRole("link", { name: "Portal", exact: true })).toBeVisible(); - await expect(page.locator("summary").filter({ hasText: "备用模块" })).toBeVisible(); + await expect(page.locator("summary").filter({ hasText: "更多" })).toBeVisible(); await attachScreenshot(page, testInfo, "app-shell.png"); }); @@ -334,8 +334,8 @@ test.describe("visual shell", () => { await page.setViewportSize({ width: 1440, height: 1024 }); await loginVisualUser(page); - await expect(page.getByRole("heading", { name: "待处理" })).toBeVisible(); - await expect(page.getByRole("heading", { name: "常用" })).toBeVisible(); + await expect(page.getByRole("heading", { name: "今天先处理" })).toBeVisible(); + await expect(page.getByRole("heading", { name: "常用动作" })).toBeVisible(); await expect(page.locator("summary").filter({ hasText: /角色重点|更多入口/ })).toBeVisible(); await attachScreenshot(page, testInfo, "pc-portal-wave1.png");