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
@@ -134,6 +134,7 @@ test("调查报告展示 SVG 脉络、处置进展和报告版本,缺数正常
}
if (method === "PATCH" && path.endsWith(`/actions/${actionId}/draft`)) {
const body = route.request().postDataJSON();
expect(body.payload.scheduled_at).toBe("2026-07-16T05:00:00.000Z");
expect(body.payload.title).toBe("现场采样修订稿");
expect(body.payload.work_order_type).toBe("general");
const action = { ...task.actions[0], version: 2, payload: body.payload, edited_by: "reviewer", edited_at: now };
@@ -309,7 +310,7 @@ test("调查报告展示 SVG 脉络、处置进展和报告版本,缺数正常
await agentPanel.screenshot({ path: testInfo.outputPath("discussion-without-fixed-review.png") });
// Narrow-screen conversation layout is covered by investigation-main-chat.e2e.ts.
await page.getByRole("button", { name: /查看待办与告警/ }).click();
await page.getByRole("menuitem").filter({ hasText: "待确认现场采样工单" }).click();
await page.getByRole("menuitem", { name: "打开通知:待确认现场采样工单" }).click();
const pending = panel.getByLabel("当前需处理", { exact: true });
const review = pending.locator(`[data-action-id="${actionId}"]`);
await expect(review).toBeVisible();
@@ -320,6 +321,19 @@ test("调查报告展示 SVG 脉络、处置进展和报告版本,缺数正常
await expect(review).toContainText("工单归属");
await expect(review).toContainText("预约任务");
await review.getByRole("textbox", { name: "工单标题" }).fill("现场采样修订稿");
await review.getByRole("button", { name: "预约时间", exact: true }).click();
const appointmentCalendar = page.getByRole("dialog", { name: "选择预约时间", exact: true });
await appointmentCalendar.getByRole("textbox", { name: "年份", exact: true }).fill("2026");
await appointmentCalendar.getByRole("combobox", { name: "月份", exact: true }).click();
await page.getByRole("option", { name: "7月", exact: true }).click();
await appointmentCalendar.getByRole("gridcell", { name: "2026年7月16日", exact: true }).click();
await appointmentCalendar.getByRole("combobox", { name: "小时", exact: true }).click();
await page.getByRole("option", { name: "13", exact: true }).click();
await appointmentCalendar.getByRole("combobox", { name: "分钟", exact: true }).click();
await page.getByRole("option", { name: "00", exact: true }).click();
await appointmentCalendar.getByRole("button", { name: "确认", exact: true }).click();
await expect(review.getByRole("button", { name: "预约时间", exact: true })).toContainText("2026-07-16 13:00");
await testInfo.attach("appointment-time-edit", { body: await review.screenshot({ path: testInfo.outputPath("appointment-time-edit.png") }), contentType: "image/png" });
await review.getByRole("button", { name: "保存草稿" }).click();
await expect(panel.getByText("现场采样修订稿").first()).toBeVisible();
await review.getByRole("button", { name: "确认并创建预约工单" }).click();