feat: add dispatch retry and import recovery flows
This commit is contained in:
@@ -2,6 +2,7 @@ import test from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import {
|
||||
extractApprovedTargetProjectIds,
|
||||
latestRejectedDispatchPlan,
|
||||
latestPendingDispatchPlan,
|
||||
summarizeDispatchPlan,
|
||||
} from "@/lib/dispatch-plan-ui";
|
||||
@@ -54,3 +55,27 @@ test("latestPendingDispatchPlan returns the latest waiting confirmation item", (
|
||||
targets: [{ projectId: "p2", threadDisplayName: "设备接入线程" }],
|
||||
});
|
||||
});
|
||||
|
||||
test("latestRejectedDispatchPlan returns the latest rejected item", () => {
|
||||
const plan = latestRejectedDispatchPlan([
|
||||
{
|
||||
planId: "dispatch-plan-1",
|
||||
status: "dispatched",
|
||||
summary: "已完成的推荐",
|
||||
targets: [{ projectId: "p1", threadDisplayName: "Boss UI 主线程" }],
|
||||
},
|
||||
{
|
||||
planId: "dispatch-plan-3",
|
||||
status: "rejected",
|
||||
summary: "已拒绝的推荐",
|
||||
targets: [{ projectId: "p3", threadDisplayName: "调度修复线程" }],
|
||||
},
|
||||
]);
|
||||
|
||||
assert.deepEqual(plan, {
|
||||
planId: "dispatch-plan-3",
|
||||
status: "rejected",
|
||||
summary: "已拒绝的推荐",
|
||||
targets: [{ projectId: "p3", threadDisplayName: "调度修复线程" }],
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user