Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: show and toggle an agent's unrestricted internet flag, add it to the create dialog

This commit is contained in:
atlas 2026-10-27 13:38:58 +01:00 • committed by mara
commit 10508895c4

View file

@ -4,6 +4,7 @@ import assert from "node:assert/strict";
import { test } from "node:test";
import {
initialSelection,
requestInternet,
requestPermissions,
togglePermission,
} from "../src/pages/CreateAgentPermissions.ts";
@ -44,3 +45,11 @@ test("the starting selection is the default plus the known extras", () => {
defaults,
);
});
test("the create box is unticked by default and sends nothing", () => {
assert.deepEqual(requestInternet(false), {});
});
test("a ticked create box sends the flag", () => {
assert.deepEqual(requestInternet(true), { unrestricted_internet: true });
});