diff --git a/web/hwlab-cloud-web/scripts/workbench-e2e-server.ts b/web/hwlab-cloud-web/scripts/workbench-e2e-server.ts index db11c260..35822b09 100644 --- a/web/hwlab-cloud-web/scripts/workbench-e2e-server.ts +++ b/web/hwlab-cloud-web/scripts/workbench-e2e-server.ts @@ -557,7 +557,7 @@ function fakePerformanceWindow(value: string | null): FakePerformanceWindow { "1h": { label: "最近 1 小时", seconds: 3600, windowFrom: "2026-06-18T03:30:00.000Z" }, "6h": { label: "最近 6 小时", seconds: 21600, windowFrom: "2026-06-17T22:30:00.000Z" }, "24h": { label: "最近 24 小时", seconds: 86400, windowFrom: "2026-06-17T04:30:00.000Z" }, - all: { label: "全部样本", seconds: null, windowFrom: null } + all: { label: "全部累计", seconds: null, windowFrom: null } }; const spec = specs[id] ?? { label: "最近 15 分钟", seconds: 900, windowFrom: "2026-06-18T04:15:00.000Z" }; return { id, generatedAt, windowTo: generatedAt, ...spec }; diff --git a/web/hwlab-cloud-web/tests/workbench-e2e/specs/admin-hwpod-performance.spec.ts b/web/hwlab-cloud-web/tests/workbench-e2e/specs/admin-hwpod-performance.spec.ts index 0422feb8..978f837a 100644 --- a/web/hwlab-cloud-web/tests/workbench-e2e/specs/admin-hwpod-performance.spec.ts +++ b/web/hwlab-cloud-web/tests/workbench-e2e/specs/admin-hwpod-performance.spec.ts @@ -64,7 +64,7 @@ test("performance dashboard renders Chinese charts and keeps drill-down reachabl { tab: "1 小时", windowId: "1h", label: "最近 1 小时" }, { tab: "6 小时", windowId: "6h", label: "最近 6 小时" }, { tab: "24 小时", windowId: "24h", label: "最近 24 小时" }, - { tab: "全部", windowId: "all", label: "全部样本" } + { tab: "全部", windowId: "all", label: "全部累计" } ]; for (const item of windowChecks) { await page.getByRole("tab", { name: item.tab, exact: true }).click(); @@ -76,7 +76,7 @@ test("performance dashboard renders Chinese charts and keeps drill-down reachabl const allRequestsBeforeRefresh = countWindowRequests(summaryRequests, "all"); await page.getByLabel("采集新鲜度").getByRole("button", { name: "刷新" }).click(); await expect.poll(async () => countWindowRequests(await performanceSummaryRequests(page), "all")).toBeGreaterThan(allRequestsBeforeRefresh); - await expect(page.locator(".performance-contract-item").filter({ hasText: "观测窗口" })).toContainText("全部样本"); + await expect(page.locator(".performance-contract-item").filter({ hasText: "观测窗口" })).toContainText("全部累计"); await page.screenshot({ path: ".state/workbench-e2e/performance-dashboard-desktop.png", fullPage: true });