feat(workbench): expand SCADA monitoring and investigation presentation

This commit is contained in:
2026-11-07 19:50:14 +08:00
parent 0801e161ec
commit ba71e2d529
133 changed files with 6754 additions and 1438 deletions
@@ -51,7 +51,7 @@ test.beforeEach(async ({ page }) => {
task = { ...task, latest_report: { ...report, revision: 2, report: { ...report.report,
current_conclusion: "上报时间2026-10-08T04:00:00Z,查询04:00–05:00Z。",
conclusion_boundary: "覆盖2026-12-31 15:30–17:00Z。",
recommendations: ["复核2026-10-08T05:00:00Z的数据。"],
recommendations: ["复核2026-10-08T05:00:00Z的数据。", "目标2026-07-16 00:00(UTC0),当前08:00(UTC+8)。"],
data_gaps: [{ ...report.report.data_gaps[0], scope: "2026-10-08 04:00–05:00Z" }]
} } };
Object.assign(window, { storedReportConclusion: task.latest_report.report.current_conclusion });
@@ -112,7 +112,7 @@ for (const clearProgressDiagram of [false, true]) {
test.describe("报告正文时间展示", () => {
test.use({ timezoneId: "UTC" });
test("历史 UTC 正文和查询范围按 UTC+8 展示并保留原始报告", async ({ page }) => {
test("历史 UTC 正文和查询范围按 UTC+8 展示并保留原始报告", async ({ page }, testInfo) => {
await page.evaluate(() => (window as unknown as { showHistoricalUtcReport: () => void }).showHistoricalUtcReport());
const report = page.getByRole("region", { name: "任务报告", exact: true });
await expect(report).toContainText("上报时间2026/10/8 12:00:00(UTC+8),查询12:00–13:00(UTC+8)。");
@@ -121,8 +121,10 @@ test.describe("报告正文时间展示", () => {
await page.getByRole("button", { name: "展开当前结果", exact: true }).click();
const detail = page.getByRole("dialog", { name: "当前结果", exact: true });
await expect(detail).toContainText("复核2026/10/8 13:00:00(UTC+8)的数据。");
await expect(detail).toContainText("目标2026/7/16 08:00:00(UTC+8),当前08:00(UTC+8)。");
expect(await page.evaluate(() => (window as unknown as { storedReportConclusion: string }).storedReportConclusion))
.toBe("上报时间2026-10-08T04:00:00Z,查询04:00–05:00Z。");
await testInfo.attach("utc8-report", { body: await detail.screenshot({ path: testInfo.outputPath("utc8-report.png"), animations: "disabled" }), contentType: "image/png" });
});
});