swarm-ui: retrying a broadcast shows the agents that failed, even ones the filter hides
This commit is contained in:
parent
89b20a5a50
commit
f65364759f
4 changed files with 33 additions and 3 deletions
|
|
@ -5,6 +5,7 @@ import assert from "node:assert/strict";
|
|||
import { test } from "node:test";
|
||||
import {
|
||||
failedAgents,
|
||||
filterShowing,
|
||||
MAX_BROADCAST,
|
||||
isRunning,
|
||||
parseResults,
|
||||
|
|
@ -94,3 +95,14 @@ test("an answer that is not the agreed shape is null, not an empty list", () =>
|
|||
test("one broadcast may name at most 64 agents", () => {
|
||||
assert.equal(MAX_BROADCAST, 64);
|
||||
});
|
||||
|
||||
test("a retry shows the failed agents even when the filter hides them", () => {
|
||||
const agents = [
|
||||
{ name: "a", snapshot: { running: true } },
|
||||
{ name: "b", snapshot: { running: false } },
|
||||
];
|
||||
assert.equal(filterShowing("running", agents, ["a"]), "running");
|
||||
assert.equal(filterShowing("running", agents, ["a", "b"]), "all");
|
||||
assert.equal(filterShowing("running", agents, ["b"]), "all");
|
||||
assert.equal(filterShowing("all", agents, ["b"]), "all");
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue