feat(workbench): integrate runtime data and map tooling
This commit is contained in:
@@ -77,4 +77,44 @@ describe("createVisibleTickerCards", () => {
|
||||
]);
|
||||
expect(cards.map((card) => card.stackIndex)).toEqual([0, 1]);
|
||||
});
|
||||
|
||||
it("uses persisted backend status without inferring workflow or progress", () => {
|
||||
const condition: ScheduledConditionRecord = {
|
||||
...createRunningCondition("backend-condition", "scada-diagnosis"),
|
||||
taskId: "backend-schedule",
|
||||
dataSource: "scheduled_tasks",
|
||||
title: "演示 后端调查",
|
||||
summary: "后端任务仍在运行",
|
||||
detail: "后端记录:等待计算结果"
|
||||
};
|
||||
|
||||
const [card] = createVisibleTickerCards(
|
||||
[condition],
|
||||
0,
|
||||
Date.parse("2026-07-08T10:09:00+08:00"),
|
||||
"scheduled_tasks"
|
||||
);
|
||||
|
||||
expect(card?.view).toEqual({
|
||||
title: "演示 后端调查 · 后端执行中",
|
||||
currentStep: {
|
||||
id: "backend-status",
|
||||
title: "后端状态",
|
||||
detail: "后端记录:等待计算结果"
|
||||
}
|
||||
});
|
||||
expect(card?.view.progressValue).toBeUndefined();
|
||||
});
|
||||
|
||||
it("labels inferred mock workflow progress as demonstration data", () => {
|
||||
const [card] = createVisibleTickerCards(
|
||||
[createRunningCondition("condition-a", "scada-diagnosis")],
|
||||
0,
|
||||
Date.parse("2026-07-08T10:01:00+08:00"),
|
||||
"mock"
|
||||
);
|
||||
|
||||
expect(card?.view.title).toContain("演示 · SCADA 诊断流程");
|
||||
expect(card?.view.progressValue).toBe(10);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user