swarm-ui: show and toggle an agent's unrestricted internet flag, add it to the create dialog
This commit is contained in:
parent
24beb167d8
commit
10508895c4
1 changed files with 136 additions and 2 deletions
|
|
@ -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 });
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue