refactor(workbench): simplify appointment tasks
This commit is contained in:
@@ -53,23 +53,10 @@ test("history mode opens on the latest day with backend work orders", async ({ p
|
||||
source: "工单系统",
|
||||
dispatcher: "调度中心",
|
||||
priority: "normal",
|
||||
subtasks: [{
|
||||
id: "wo-history-1-subtask-1",
|
||||
title: "阀门状态复核",
|
||||
summary: "现场复核阀门状态并回传。",
|
||||
status: "running",
|
||||
scheduled_at: "2026-08-17T09:40:00Z",
|
||||
location: "北区阀门 V-17",
|
||||
assignee: "北区班组",
|
||||
duration_minutes: 30,
|
||||
reply_window_minutes: 15,
|
||||
stages: [
|
||||
{ id: "dispatch", sequence: 1, title: "派发", status: "done", owner: "调度中心", time_label: "17:20", description: "已派发。" },
|
||||
{ id: "execution", sequence: 2, title: "执行", status: "current", owner: "北区班组", time_label: "17:40-18:10", description: "现场复核中。" },
|
||||
{ id: "reply", sequence: 3, title: "复令", status: "pending", owner: "北区班组", time_label: "18:10-18:25", description: "等待结果回传。" }
|
||||
],
|
||||
reply_requirements: ["回传阀门状态"]
|
||||
}]
|
||||
location: "北区阀门 V-17",
|
||||
assignee: "北区班组",
|
||||
feedback_requirements: ["回传阀门状态"],
|
||||
activity: []
|
||||
}]
|
||||
}, undefined, {}, [], { runtimeMode: "history" });
|
||||
|
||||
@@ -450,23 +437,11 @@ test("keeps mock conditions while using backend work orders and alerts", async (
|
||||
source: "生产工单系统",
|
||||
dispatcher: "调度中心",
|
||||
priority: "urgent",
|
||||
subtasks: [{
|
||||
id: "wo-backend-1-subtask-1",
|
||||
title: "阀门开度复核",
|
||||
summary: "现场复核阀门开度。",
|
||||
status: "running",
|
||||
scheduled_at: TODAY_11_00,
|
||||
location: "北区阀门 V-1",
|
||||
assignee: "北区班组",
|
||||
duration_minutes: 45,
|
||||
reply_window_minutes: 20,
|
||||
stages: [
|
||||
{ id: "dispatch", sequence: 1, title: "派发", status: "done", owner: "调度中心", time_label: "10:50", description: "已派发。" },
|
||||
{ id: "execution", sequence: 2, title: "执行中", status: "current", owner: "北区班组", time_label: "11:00—11:45", description: "现场执行中。" },
|
||||
{ id: "reply", sequence: 3, title: "待复令", status: "pending", owner: "北区班组", time_label: "11:45—12:05", description: "等待复令。" }
|
||||
],
|
||||
reply_requirements: ["回传阀门开度"]
|
||||
}]
|
||||
location: "北区阀门 V-1",
|
||||
assignee: "北区班组",
|
||||
feedback_requirements: ["回传阀门开度"],
|
||||
activity: [{ sequence: 1, occurred_at: TODAY, actor: "调度中心", kind: "created",
|
||||
title: "工单创建", detail: "现场复核阀门开度并回传。" }]
|
||||
}]
|
||||
});
|
||||
await page.goto("/", { waitUntil: "domcontentloaded" });
|
||||
@@ -481,12 +456,10 @@ test("keeps mock conditions while using backend work orders and alerts", async (
|
||||
await expect(panel).not.toContainText("工单演示回退");
|
||||
await panel.getByRole("button", { name: /后端工单:北区阀门复核/ }).click();
|
||||
const detail = panel.getByTestId("scheduled-condition-detail-scroll");
|
||||
await expect(detail.getByText("子任务", { exact: true })).toBeVisible();
|
||||
await expect(detail.getByText(/阀门开度复核/).first()).toBeVisible();
|
||||
await expect(detail.getByText("0/1 完成", { exact: true })).toBeVisible();
|
||||
await expect(
|
||||
detail.locator("details").filter({ hasText: "阀门开度复核" }).getByText("执行中", { exact: true })
|
||||
).toBeVisible();
|
||||
await expect(detail.getByText("预约工单", { exact: true }).last()).toBeVisible();
|
||||
await expect(detail.getByText("回传阀门开度", { exact: true })).toBeVisible();
|
||||
await expect(detail.getByText("活动记录", { exact: true })).toBeVisible();
|
||||
await expect(detail.locator("details")).toHaveCount(0);
|
||||
|
||||
const alertButton = page.getByRole("button", {
|
||||
name: "查看异常处置面板,当前 1 条待复核工况"
|
||||
|
||||
Reference in New Issue
Block a user