feat(hub): grant split menu, radio redesign and answerable decision rows
The Grant bar becomes one split control: Select, or Grant N with a menu for Deny, Grant all green, the picked list, Clear and Direct mode; picked items turn pale green. The radio drops its filter flyout and gains three-state bells per row, a test per row including Speak, Auto or Morse on a second click, mute on the sender avatar and the agent profile, Cancel MAYDAY beside Send only while one is active, a Send menu with a test message and hold-to-record push-to-talk. Decision rows read as questions with their options; the signed answer is Decision <id> plus Answer: <answer>, and the card names its recipient. Security: the passkey-signed answer carries no agent-written text, the inbox lists answerable rows only when their id fullmatches the TASK rule of the installed rasci.py (skill_scripts.task_pattern), and rasci.py, operator.py and hotfix.py check task slugs with fullmatch, so a trailing newline no longer passes. Accepted MEDUSA findings after kvb-think-criticize: page-inbox.js:116 EXA006 (by design after the fix), page-inbox.js:125 EXA010, operator.py:173, 618 and 633 RP001, FT-TRIGGER-005 and RLHF-POISON-002, operator.py:639 MEX-SCAN-346, operator.py:968 MM-SCAN-058, operator.py:974 ACP-SCAN-028 (false positives). 🎯 Fix: 85 % 💥 Break: 10 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 77 🚦 Gate: ⛔ fix 85 % < 90, break 10 % > 5 Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ff9bbc19c2
commit
d695bb2b58
42 files changed
+1158
-340
No files matched your search
@@ -58,8 +58,10 @@ INBOX_PICK = """(async () => {@HELPERS@
|
||||
const focused = Boolean(holder && text(holder.querySelector(".command code")) === title && document.activeElement.checked);
|
||||
all("#main .inbox-list > li").find((li) => li.textContent.includes("pick a name")).querySelector("input").click();
|
||||
await sleep(300);
|
||||
const buttons = all("#main .inbox-actions button").map(name);
|
||||
all("#main .inbox-actions button").find((button) => name(button).startsWith("Deny selection")).click();
|
||||
const buttons = all("#grant-bar .grant-split button").map(name);
|
||||
document.querySelector("#grant-bar details.grant-menu > summary").click();
|
||||
await until(() => document.querySelector("#grant-bar details.grant-menu[open]"), 2000);
|
||||
all("#grant-bar .grant-split button").find((button) => name(button).startsWith("Deny selection")).click();
|
||||
await until(() => document.querySelector(".sheet-box .actions"), 4000);
|
||||
const listed = all(".sheet-box ul.mini > li strong").map(text);
|
||||
const reason = document.querySelector(".sheet-box .deny-reason textarea");
|
||||
|
||||
+29
-37
@@ -229,9 +229,9 @@ CLEAR_MAYDAY = """(async () => {@HELPERS@
|
||||
};
|
||||
await until(() => document.querySelector('#main [role="toolbar"]'), 8000);
|
||||
const toolbar = all('#main [role="toolbar"] button, #main [role="toolbar"] summary').map(name);@SPOT_OPEN@
|
||||
const button = await until(() => spot && all(".spot-head button", spot).find((node) => name(node) === "Cancel mayday" && !node.disabled), 8000);
|
||||
const button = await until(() => spot && all("form.composer .radio-cancel", spot).find((node) => name(node) === "Cancel mayday" && !node.hidden), 8000);
|
||||
if (!button) {
|
||||
return {error: "no enabled Cancel mayday button in the radio spot", toolbar};
|
||||
return {error: "no shown Cancel mayday button next to PTT", toolbar};
|
||||
}
|
||||
const shown = new Set(all("#toasts .toast"));
|
||||
const fresh = () => all("#toasts .toast").filter((node) => !shown.has(node)).map(text);
|
||||
@@ -266,7 +266,9 @@ SPOT_SEND = """(async () => {@HELPERS@
|
||||
toolbar: all('#main [role="toolbar"] > *').map((node) => name(node.tagName === "DETAILS" ? node.querySelector("summary") : node)),
|
||||
channels: all("option", channel).map((option) => option.value),
|
||||
record: all("button", form).filter((button) => button.hasAttribute("aria-pressed") && !button.classList.contains("mic")).map(text),
|
||||
heads: all(".spot-head button", spot).map((button) => [name(button), button.title]),
|
||||
heads: all(".spot-head button", spot).length,
|
||||
send: all(".ptt-split :is(button, summary)", form).filter((node) => !node.closest(".menu-box")).map((node) => [name(node), node.title]),
|
||||
cancel: form.querySelector(".radio-cancel").hidden,
|
||||
@FITS@,
|
||||
};
|
||||
await until(() => [...recipient.options].some((option) => option.value === "Stage"), 8000);
|
||||
@@ -310,7 +312,7 @@ RADIO_JUMP = """(async () => {@HELPERS@
|
||||
await sleep(200);
|
||||
return {
|
||||
hash: "#stream", focused, tabs, closed: [spot.hidden, toggle.getAttribute("aria-expanded")],
|
||||
header: all("header.top button").map((button) => [button.id, name(button), text(button)]), radioTab: Boolean(document.getElementById("tab-radio")),
|
||||
header: all("header.top button[id]").map((button) => [button.id, name(button), text(button)]), radioTab: Boolean(document.getElementById("tab-radio")),
|
||||
};
|
||||
})()""".replace("@HELPERS@", HELPERS)
|
||||
CANCELED = """() => {
|
||||
@@ -324,63 +326,53 @@ CANCELED = """() => {
|
||||
}"""
|
||||
JUMPED = {
|
||||
"hash": "#stream", "focused": True, "tabs": [[tab, True, True] for tab in ("#home", "#stream/inbox", "#agents/orbit", "#artifacts/tree", "#tasks/list", "#resources")], "closed": [True, "false"],
|
||||
"header": [["grant-direct", "Direct", "Direct"], ["grant-select", "Select", "Select"], ["radio-open", "Radio", ""], ["bubbles-toggle", "Speech bubbles", ""], ["palette-open", "Commands", ""], ["settings-open", "Settings", ""]], "radioTab": False,
|
||||
"header": [["grant-select", "Select", "Select"], ["radio-open", "Radio", ""], ["bubbles-toggle", "Speech bubbles", ""], ["palette-open", "Commands", ""], ["settings-open", "Settings", ""]], "radioTab": False,
|
||||
}
|
||||
GEAR_SAVE = """(async () => {@HELPERS@@CLASHES@
|
||||
BELLS = """
|
||||
const bell = (label) => spot.querySelector(`.radio-face button[aria-label="${label} tone"]`);
|
||||
const ring = async (label, want) => {
|
||||
for (let press = 0; press < 3 && bell(label).dataset.bell !== want; press += 1) {
|
||||
bell(label).click();
|
||||
await sleep(100);
|
||||
}
|
||||
};
|
||||
"""
|
||||
BELL_SAVE = """(async () => {@HELPERS@@CLASHES@@BELLS@
|
||||
const spot = document.getElementById("radio-spot");
|
||||
const face = spot.querySelector(".radio-face");
|
||||
const gear = all(".spot-head button", spot).find((button) => name(button) === "Read aloud");
|
||||
gear.click();
|
||||
const box = await until(() => spot.querySelector("#radio-gear .radio-read"), 4000);
|
||||
if (!box) {
|
||||
return {error: "no read-aloud filters behind the gear"};
|
||||
}
|
||||
const chips = () => all('#radio-gear [aria-label="Classes"] button', spot);
|
||||
const post = () => chips().find((chip) => text(chip) === "Post");
|
||||
const found = {
|
||||
expanded: gear.getAttribute("aria-expanded"),
|
||||
tones: all(".radio-knobs .knob-label", face).map(text),
|
||||
classes: chips().map((chip) => [text(chip), chip.getAttribute("aria-pressed"), chip.disabled]),
|
||||
clashes: [clashes(face), clashes(spot.querySelector("#radio-gear"))],
|
||||
bells: all(".radio-knobs .knob-toggle", face).map((button) => name(button)),
|
||||
clashes: [clashes(face)],
|
||||
@FITS@,
|
||||
};
|
||||
const squelch = face.querySelector('input[aria-label="Squelch"]');
|
||||
squelch.value = "@SQUELCH@";
|
||||
squelch.dispatchEvent(new Event("input", {bubbles: true}));
|
||||
const tone = face.querySelector('button[aria-label="All radio tone"]');
|
||||
if (tone.getAttribute("aria-pressed") !== "@TONE@") {
|
||||
tone.click();
|
||||
}
|
||||
if (post().getAttribute("aria-pressed") !== "@POST@") {
|
||||
post().click();
|
||||
}
|
||||
await ring("All radio", "@RADIO@");
|
||||
await ring("Post and calls to you", "@POST@");
|
||||
await sleep(200);
|
||||
const kept = JSON.parse(localStorage.getItem("kvb-orchestrator.radio"));
|
||||
found.kept = [kept.squelch, kept.sounds.radio.on, kept.classes.includes("post")];
|
||||
gear.click();
|
||||
await sleep(200);
|
||||
found.after = [gear.getAttribute("aria-expanded"), Boolean(spot.querySelector("#radio-gear .radio-read"))];
|
||||
found.after = [bell("All radio").dataset.bell, bell("Post and calls to you").dataset.bell];
|
||||
document.getElementById("settings-open").click();
|
||||
const sheet = await until(() => document.querySelector(".sheet-box form.settings"), 4000);
|
||||
found.general = {sections: all("section > h3", sheet).map(text), radio: all('[aria-label="Squelch"], [aria-label="Classes"], [aria-label="Speakers"], [aria-label="Mode"], .sound-row, .stream-row', sheet).length};
|
||||
document.querySelector(".sheet-head button").click();
|
||||
return found;
|
||||
})()""".replace("@HELPERS@", HELPERS).replace("@CLASHES@", OVERLAP).replace("@FITS@", FITS)
|
||||
GEAR_READ = """(async () => {@HELPERS@@SPOT_OPEN@
|
||||
const gear = spot ? all(".spot-head button", spot).find((button) => name(button) === "Read aloud") : null;
|
||||
if (!gear) {
|
||||
})()""".replace("@HELPERS@", HELPERS).replace("@CLASHES@", OVERLAP).replace("@BELLS@", BELLS).replace("@FITS@", FITS)
|
||||
BELL_READ = """(async () => {@HELPERS@@SPOT_OPEN@@BELLS@
|
||||
const face = spot ? spot.querySelector(".radio-face") : null;
|
||||
if (!face) {
|
||||
return {error: text(document.getElementById("main"))};
|
||||
}
|
||||
gear.click();
|
||||
await until(() => spot.querySelector("#radio-gear .radio-read"), 4000);
|
||||
const face = spot.querySelector(".radio-face");
|
||||
return {
|
||||
squelch: Number(face.querySelector('input[aria-label="Squelch"]').value),
|
||||
tone: face.querySelector('button[aria-label="All radio tone"]').getAttribute("aria-pressed") === "true",
|
||||
post: all('#radio-gear [aria-label="Classes"] button', spot).find((chip) => text(chip) === "Post").getAttribute("aria-pressed") === "true",
|
||||
radio: bell("All radio").dataset.bell,
|
||||
post: bell("Post and calls to you").dataset.bell,
|
||||
@FITS@,
|
||||
};
|
||||
})()""".replace("@HELPERS@", HELPERS).replace("@SPOT_OPEN@", SPOT_OPEN).replace("@FITS@", FITS)
|
||||
})()""".replace("@HELPERS@", HELPERS).replace("@SPOT_OPEN@", SPOT_OPEN).replace("@BELLS@", BELLS).replace("@FITS@", FITS)
|
||||
|
||||
|
||||
class Station(http.server.BaseHTTPRequestHandler):
|
||||
|
||||
@@ -147,20 +147,20 @@ HOME = """(async () => {@HELPERS@@PROBES@
|
||||
}));
|
||||
const fresh = measure();
|
||||
const whole = tile("radio");
|
||||
const bar = whole.querySelector(".spot-head");
|
||||
const gear = bar ? all("button", bar).find((button) => button.getAttribute("aria-label") === "Read aloud") : null;
|
||||
const clear = bar ? all("button", bar).find((button) => button.getAttribute("aria-label") === "Cancel mayday") : null;
|
||||
if (gear) {
|
||||
gear.click();
|
||||
const active = whole.querySelector('.radio-modes button[aria-pressed="true"]');
|
||||
const opens = Boolean(active && active.querySelector(".mode-caret"));
|
||||
if (opens) {
|
||||
active.click();
|
||||
await sleep(200);
|
||||
}
|
||||
const filters = whole.querySelector(".radio-gear .radio-read");
|
||||
const menu = whole.querySelector(".radio-mode-menu:not([hidden])");
|
||||
const cancel = whole.querySelector("form.composer .radio-cancel");
|
||||
const tools = {
|
||||
gear: gear ? [gear.getAttribute("aria-expanded"), Boolean(filters), filters ? box(filters).bottom <= box(whole).bottom + 1 : null] : null,
|
||||
clear: clear ? [clear.disabled, clear.title] : null,
|
||||
menu: opens ? [active.getAttribute("aria-expanded"), Boolean(menu), menu ? box(menu).bottom <= box(whole).bottom + 1 : null] : null,
|
||||
cancel: cancel ? [cancel.hidden, cancel.title] : null,
|
||||
};
|
||||
if (gear) {
|
||||
gear.click();
|
||||
if (opens) {
|
||||
active.click();
|
||||
}
|
||||
const content = {
|
||||
tiles: all("#main .home-tile").map((node) => node.dataset.pin),
|
||||
|
||||
+33
-19
@@ -120,7 +120,14 @@ RADIO = """
|
||||
spot.querySelector(`.radio-tabs [data-tab="${id}"]`).click();
|
||||
await sleep(150);
|
||||
};
|
||||
const unlabelled = () => all(".radio-face :is(button, select, input), #radio-gear :is(button, select, input), .radio-logbox :is(button, select, input), .radio-station button", spot).filter((node) => node.getClientRects().length && !node.getAttribute("aria-label") && !text(node)).length;
|
||||
const modeMenu = async (mode, open) => {
|
||||
const button = spot.querySelector(`.radio-modes button[data-mode="${mode}"]`);
|
||||
if ((button.getAttribute("aria-expanded") === "true") !== open) {
|
||||
button.click();
|
||||
await sleep(200);
|
||||
}
|
||||
};
|
||||
const unlabelled = () => all(".radio-face :is(button, select, input), .radio-logbox :is(button, select, input), .radio-station button, form.composer :is(button, summary)", spot).filter((node) => node.getClientRects().length && !node.getAttribute("aria-label") && !text(node)).length;
|
||||
""".replace("@CUES@", ", ".join(f'"{name}": "{ident}"' for name, ident in CUES.items()))
|
||||
FACE = """(async () => {@HELPERS@@RADIO@
|
||||
await cpuShown("CPU 10 %");
|
||||
@@ -138,12 +145,15 @@ FACE = """(async () => {@HELPERS@@RADIO@
|
||||
const squelchLit = Boolean(await until(() => lamp().dataset.lit === "true" && audio().filters.length > atTest.filters, 6000));
|
||||
const squelch = {lit: squelchLit, filters: since(atTest).filters.map(([type]) => type), tts: since(atTest).tts};
|
||||
await until(() => lamp().dataset.lit === "false", 6000);
|
||||
const gear = all(".spot-head button", spot).find((button) => name(button) === "Read aloud");
|
||||
gear.click();
|
||||
await sleep(200);
|
||||
const groups =Object.fromEntries(all("#radio-gear .chips", spot).map((group) => [group.getAttribute("aria-label"), all(".chip", group).map((chipNode) => [text(chipNode), chipNode.getAttribute("aria-pressed"), chipNode.disabled])]));
|
||||
all('#radio-gear .chips[aria-label="Fallback"] .chip', spot).find((chipNode) => text(chipNode) === "Hiss").click();
|
||||
const bells = all(".radio-knobs .knob-toggle", spot).map((button) => [name(button), button.dataset.bell]);
|
||||
await modeMenu("auto", true);
|
||||
const caret = all(".radio-modes .mode-caret", spot).filter((node) => node.getClientRects().length).map((node) => node.closest("button").dataset.mode);
|
||||
const groups = Object.fromEntries(all(".radio-mode-menu .chips", spot).map((group) => [group.getAttribute("aria-label"), all(".chip", group).map((chipNode) => [text(chipNode), chipNode.getAttribute("aria-pressed"), chipNode.disabled])]));
|
||||
all('.radio-mode-menu .chips[aria-label="Fallback"] .chip', spot).find((chipNode) => text(chipNode) === "Hiss").click();
|
||||
await sleep(150);
|
||||
const menuFits = fits();
|
||||
await modeMenu("auto", false);
|
||||
const send = [name(spot.querySelector("form.composer .ptt-more")), spot.querySelector("form.composer .radio-cancel").hidden];
|
||||
const stationsHead = text(spot.querySelector(".radio-station .group-title"));
|
||||
const ptt = spot.querySelector('form.composer button[type="submit"]');
|
||||
const pageFits = fits();
|
||||
@@ -157,7 +167,7 @@ FACE = """(async () => {@HELPERS@@RADIO@
|
||||
const stations = [document.querySelector("#sheet .sheet-box").getAttribute("aria-label"), all("#sheet .settings h3").map(text)];
|
||||
all("#sheet .sheet-head button").find((button) => name(button) === "Close").click();
|
||||
await sleep(200);
|
||||
return {display, modes, knobs, toneToggles, testButtons, squelch, labels, groups, stationsHead, ptt: [text(ptt), ptt.title], sections, stations, fits: pageFits, unlabelled: unlabelled(), palette: getComputedStyle(document.documentElement).getPropertyValue("--panel").trim(), violations: window.e2eViolations};
|
||||
return {display, modes, knobs, toneToggles, testButtons, squelch, labels, bells, caret, groups, menuFits, send, stationsHead, ptt: [text(ptt), ptt.title], sections, stations, fits: pageFits, unlabelled: unlabelled(), palette: getComputedStyle(document.documentElement).getPropertyValue("--panel").trim(), violations: window.e2eViolations};
|
||||
})()"""
|
||||
LOG = """(async () => {@HELPERS@@RADIO@
|
||||
await until(() => rows().length, 8000);
|
||||
@@ -183,6 +193,15 @@ LOG = """(async () => {@HELPERS@@RADIO@
|
||||
all(".radio-filters button", spot).find((button) => name(button) === "Clear filters").click();
|
||||
await sleep(150);
|
||||
const clearedChips = [chips(), search().value, rows().length];
|
||||
const muteOf = () => spot.querySelector(".radio-row .radio-mute");
|
||||
const sender = name(muteOf());
|
||||
muteOf().click();
|
||||
await sleep(150);
|
||||
const stored = () => JSON.parse(localStorage.getItem("kvb-orchestrator.radio") || "{}").muted || [];
|
||||
const muted = [sender, muteOf().getAttribute("aria-pressed"), stored().length, document.getElementById("popup").open];
|
||||
muteOf().click();
|
||||
await sleep(150);
|
||||
const unmuted = [muteOf().getAttribute("aria-pressed"), stored().length];
|
||||
spot.querySelector(".radio-row .radio-pick").click();
|
||||
const full = await until(() => document.getElementById("popup").open && document.querySelector("#popup .radio-full"), 4000);
|
||||
const opened = [document.getElementById("popup").open, text(full)];
|
||||
@@ -195,7 +214,7 @@ LOG = """(async () => {@HELPERS@@RADIO@
|
||||
await sleep(200);
|
||||
spot.querySelector(".radio-logbox").scrollIntoView({block: "start"});
|
||||
await sleep(200);
|
||||
return {counts, sent, received, every, posts, fromStage, narrowed, none, clearedChips, opened, kept: rows(), fits: fits()};
|
||||
return {counts, sent, received, every, posts, fromStage, narrowed, none, clearedChips, muted, unmuted, opened, kept: rows(), fits: fits()};
|
||||
})()"""
|
||||
LOG_KEPT = """(async () => {@HELPERS@@RADIO@
|
||||
await until(() => spot.querySelector(".radio-tabs [role=tab]"), 8000);
|
||||
@@ -307,18 +326,14 @@ MORSE_SPY = """() => {
|
||||
}""".replace("@SPY@", SPY)
|
||||
MORSE_KEYED = """
|
||||
const keyed = () => window.e2eMorse.filter((entry) => entry.stop !== null && entry.stop - entry.start > 1);
|
||||
const speed = () => spot.querySelector('#radio-gear input[aria-label="Morse speed"]');
|
||||
const rate = () => text(spot.querySelector("#radio-gear .morse-rate"));
|
||||
const gear = () => all(".spot-head button", spot).find((button) => name(button) === "Read aloud");
|
||||
const speed = () => spot.querySelector('.radio-mode-menu input[aria-label="Morse speed"]');
|
||||
const rate = () => text(spot.querySelector(".radio-mode-menu .morse-rate"));
|
||||
"""
|
||||
MORSE = """(async () => {@HELPERS@@RADIO@@KEYED@
|
||||
press("morse");
|
||||
await sleep(200);
|
||||
const mode = [pressed(), field("mode"), spot.querySelector('.radio-modes button[data-mode="morse"]').title];
|
||||
if (gear().getAttribute("aria-expanded") !== "true") {
|
||||
gear().click();
|
||||
await sleep(200);
|
||||
}
|
||||
await modeMenu("morse", true);
|
||||
const before = [speed().min, speed().max, speed().step, speed().value, rate()];
|
||||
speed().value = "@WPM@";
|
||||
speed().dispatchEvent(new Event("input", {bubbles: true}));
|
||||
@@ -327,16 +342,15 @@ MORSE = """(async () => {@HELPERS@@RADIO@@KEYED@
|
||||
const toast = await until(() => all("#toasts .toast strong").map(text).includes("Morse speed saved"), 15000);
|
||||
await sleep(300);
|
||||
const saved = [speed().value, rate()];
|
||||
const gearFits = fits();
|
||||
gear().click();
|
||||
await sleep(200);
|
||||
const menuFits = fits();
|
||||
await modeMenu("morse", false);
|
||||
const at = {tts: audio().tts.length, keyed: keyed().length};
|
||||
await cue("alarm");
|
||||
refreshNow();
|
||||
const playing = await until(() => keyed().length > at.keyed && lamp().dataset.lit === "true", 20000);
|
||||
const caption = spot.querySelector(".radio-caption");
|
||||
return {
|
||||
mode, before, dragged, toast: Boolean(toast), saved, gearFits, playing: Boolean(playing), keyed: keyed().slice(at.keyed), tts: audio().tts.length - at.tts,
|
||||
mode, before, dragged, toast: Boolean(toast), saved, menuFits, playing: Boolean(playing), keyed: keyed().slice(at.keyed), tts: audio().tts.length - at.tts,
|
||||
lamp: [text(lamp()), lamp().dataset.lit], caption: [caption.hidden, text(caption.querySelector("strong"))], fits: fits(),
|
||||
};
|
||||
})()""".replace("@KEYED@", MORSE_KEYED)
|
||||
|
||||
@@ -22,12 +22,20 @@ FILES = ("src/app.py", "src/view.js", "docs/notes.md")
|
||||
ROWS = 80
|
||||
COMMON = """
|
||||
const row = (ref) => document.querySelector(`#main .inbox-list > li[data-ref="${ref}"]`);
|
||||
const modeButton = (mode) => document.querySelector(`#grant-bar button[data-mode="${mode}"]`);
|
||||
const tray = () => document.querySelector("#grant-bar .grant-tray");
|
||||
const count = () => text(document.querySelector("#grant-bar .grant-count"));
|
||||
const split = () => document.querySelector("#grant-bar .grant-split");
|
||||
const menu = () => document.querySelector("#grant-bar details.grant-menu");
|
||||
const main = () => split() && split().firstElementChild;
|
||||
const count = () => menu() && menu().querySelector("summary").getAttribute("aria-label");
|
||||
const openMenu = async () => {
|
||||
if (!menu().open) {
|
||||
menu().querySelector("summary").click();
|
||||
}
|
||||
await until(() => menu().open, 2000);
|
||||
await sleep(100);
|
||||
};
|
||||
const grantOf = (ref) => row(ref) && row(ref).querySelector(".item-actions button.primary");
|
||||
const wide = () => document.documentElement.scrollWidth > innerWidth + 1;
|
||||
const switchState = () => [modeButton("direct").getAttribute("aria-pressed"), modeButton("select").getAttribute("aria-pressed"), tray().hidden, Boolean(document.querySelector("#main .inbox-actions"))];
|
||||
const switchState = () => [name(main()), count(), document.querySelector("#grant-bar #grant-direct") ? "select" : "direct"];
|
||||
const storedMode = async (mode) => {
|
||||
const end = Date.now() + 6000;
|
||||
while (Date.now() < end) {
|
||||
@@ -75,9 +83,9 @@ MODE = """(async () => {@HELPERS@@COMMON@
|
||||
key("Escape");
|
||||
await until(() => document.getElementById("sheet").hidden, 4000);
|
||||
const before = switchState();
|
||||
modeButton("select").click();
|
||||
main().click();
|
||||
const kept = await storedMode("select");
|
||||
await until(() => !tray().hidden, 4000);
|
||||
await until(() => switchState()[2] === "select", 4000);
|
||||
return {before, kept, after: switchState(), wide: wide()};
|
||||
})()"""
|
||||
COLLECT = """(async () => {@HELPERS@@COMMON@
|
||||
@@ -89,20 +97,25 @@ COLLECT = """(async () => {@HELPERS@@COMMON@
|
||||
}
|
||||
return send(path, init);
|
||||
};
|
||||
if (!(await until(() => row("@REVIEW@") && row("@ASK@") && row("@RUN@") && !tray().hidden, 8000))) {
|
||||
if (!(await until(() => row("@REVIEW@") && row("@ASK@") && row("@RUN@") && switchState()[2] === "select", 8000))) {
|
||||
return {error: text(document.getElementById("main"))};
|
||||
}
|
||||
const restored = switchState();
|
||||
const counts = [];
|
||||
const press = async (ref, expected) => {
|
||||
grantOf(ref).click();
|
||||
const settle = async (expected) => {
|
||||
await until(() => count() === expected, 3000);
|
||||
counts.push(count());
|
||||
};
|
||||
await press("@REVIEW@", "1 selected");
|
||||
await press("@ASK@", "2 selected");
|
||||
await press("@REVIEW@", "1 selected");
|
||||
await press("@REVIEW@", "2 selected");
|
||||
grantOf("@REVIEW@").click();
|
||||
await settle("1 selected");
|
||||
const pale = [grantOf("@REVIEW@").disabled, grantOf("@REVIEW@").classList.contains("picked")];
|
||||
grantOf("@ASK@").click();
|
||||
await settle("2 selected");
|
||||
await openMenu();
|
||||
all("#grant-bar .grant-picked button").find((button) => name(button).startsWith("Remove feat: three files")).click();
|
||||
await settle("1 selected");
|
||||
grantOf("@REVIEW@").click();
|
||||
await settle("2 selected");
|
||||
if (document.activeElement) {
|
||||
document.activeElement.blur();
|
||||
}
|
||||
@@ -114,12 +127,13 @@ COLLECT = """(async () => {@HELPERS@@COMMON@
|
||||
key("a");
|
||||
await until(() => count() === "3 selected", 3000);
|
||||
counts.push(count());
|
||||
const pressed = ["@REVIEW@", "@ASK@", "@RUN@"].map((ref) => grantOf(ref).getAttribute("aria-pressed"));
|
||||
const labels = all("#grant-bar .grant-tray button").map(name);
|
||||
return {restored, counts, pressed, labels, posted, wide: wide()};
|
||||
const pressed = ["@REVIEW@", "@ASK@", "@RUN@"].map((ref) => [grantOf(ref).getAttribute("aria-pressed"), grantOf(ref).disabled]);
|
||||
await openMenu();
|
||||
const labels = all("#grant-bar .grant-split button").map(name);
|
||||
return {restored, pale, counts, pressed, labels, posted, wide: wide()};
|
||||
})()"""
|
||||
SHEET = """(async () => {@HELPERS@@COMMON@
|
||||
all("#grant-bar .grant-tray button").find((button) => name(button) === "Grant selection (3)").click();
|
||||
main().click();
|
||||
await until(() => document.querySelector(".sheet-box .actions"), 4000);
|
||||
const confirm = all(".sheet-box .actions button").find((button) => text(button).startsWith("Grant "));
|
||||
return {listed: all(".sheet-box ul.mini > li strong").map(text), label: text(confirm), wide: wide()};
|
||||
@@ -150,9 +164,10 @@ DIRECT = """(async () => {@HELPERS@@COMMON@
|
||||
}
|
||||
return send(path, init);
|
||||
};
|
||||
modeButton("direct").click();
|
||||
await openMenu();
|
||||
document.querySelector("#grant-bar #grant-direct").click();
|
||||
const kept = await storedMode("direct");
|
||||
await until(() => tray().hidden && document.querySelector("#main .inbox-actions"), 4000);
|
||||
await until(() => switchState()[2] === "direct", 4000);
|
||||
const spare = await until(() => grantOf("@SPARE@"), 4000);
|
||||
const pressed = spare.getAttribute("aria-pressed");
|
||||
spare.click();
|
||||
@@ -229,18 +244,21 @@ class TestBulkGrant(base.OrchestratorE2ECase):
|
||||
self.assertEqual(diff["ended"]["opened"], [True, True, False], diff)
|
||||
self.assertEqual(diff["second"], {"opened": [True, True, False], "marked": [1]}, diff)
|
||||
self.assertEqual(diff["jumped"], {"opened": [True, True, True], "marked": [2], "atTop": True}, diff)
|
||||
self.assertEqual((mode["before"], mode["kept"], mode["after"]), (["true", "false", True, True], True, ["false", "true", False, False]), mode)
|
||||
selecting = ["Grant selection (0)", "0 selected", "select"]
|
||||
self.assertEqual((mode["before"], mode["kept"], mode["after"]), (["Select", "0 selected", "direct"], True, selecting), mode)
|
||||
self.assertNotIn("error", collect, collect)
|
||||
self.assertEqual(collect["restored"], ["false", "true", False, False], collect)
|
||||
self.assertEqual(collect["restored"], selecting, collect)
|
||||
self.assertEqual(collect["pale"], [True, True], collect)
|
||||
self.assertEqual(collect["counts"], ["1 selected", "2 selected", "1 selected", "2 selected", "3 selected"], collect)
|
||||
self.assertEqual((collect["pressed"], collect["posted"]), (["true"] * 3, []), collect)
|
||||
self.assertEqual((collect["labels"][0], collect["labels"][-1]), ("Grant selection (3)", "Clear"), collect)
|
||||
self.assertEqual((collect["pressed"], collect["posted"]), ([["true", True]] * 3, []), collect)
|
||||
self.assertEqual((collect["labels"][0], collect["labels"][-1]), ("Grant selection (3)", "Direct"), collect)
|
||||
self.assertEqual(sum(label.startswith("Remove ") for label in collect["labels"]), 3, collect)
|
||||
self.assertEqual((sheet["label"], len(sheet["listed"])), ("Grant 3", 3), sheet)
|
||||
items = sorted(f"{ref}:approve" for ref in ids.values())
|
||||
self.assertEqual(confirm["posted"], [["/api/sign", items], *([["/api/inbox/approve", items]] if signs else [])], confirm)
|
||||
self.assertEqual(confirm["count"], "0 selected" if signs else "3 selected", confirm)
|
||||
self.assertEqual(direct["kept"], True, direct)
|
||||
self.assertEqual(direct["after"], ["true", "false", True, True], direct)
|
||||
self.assertEqual(direct["after"], ["Select", "0 selected", "direct"] if signs else ["Grant selection (3)", "3 selected", "direct"], direct)
|
||||
self.assertEqual((direct["pressed"], direct["posted"]), (None, [[self.spare]]), direct)
|
||||
self.assertFalse(any(found["wide"] for found in (diff, mode, collect, sheet, confirm, direct)), width)
|
||||
|
||||
|
||||
@@ -47,15 +47,8 @@ GIBBER_SPY = """() => {
|
||||
};
|
||||
}""".replace("@SPY@", SPY)
|
||||
GIBBER_KIT = """
|
||||
const gear = () => all(".spot-head button", spot).find((button) => name(button) === "Read aloud");
|
||||
const fallbacks = () => all('#radio-gear .chips[aria-label="Fallback"] .chip', spot);
|
||||
const fallbacks = () => all('.radio-mode-menu .chips[aria-label="Fallback"] .chip', spot);
|
||||
const kept = () => JSON.parse(localStorage.getItem("kvb-orchestrator.radio") || "{}").fallback || null;
|
||||
const opened = async (open) => {
|
||||
if ((gear().getAttribute("aria-expanded") === "true") !== open) {
|
||||
gear().click();
|
||||
await sleep(200);
|
||||
}
|
||||
};
|
||||
const sent = async (count) => {
|
||||
await cue("alarm");
|
||||
refreshNow();
|
||||
@@ -70,11 +63,9 @@ GIBBER_KIT = """
|
||||
};
|
||||
"""
|
||||
GIBBER = """(async () => {@HELPERS@@RADIO@@KIT@
|
||||
press("gibberlink");
|
||||
press("quiet");
|
||||
await sleep(200);
|
||||
const button = spot.querySelector('.radio-modes button[data-mode="gibberlink"]');
|
||||
const mode = [pressed(), field("mode"), button.title, Boolean(button.querySelector("svg.bi"))];
|
||||
await opened(true);
|
||||
await modeMenu("quiet", true);
|
||||
const before = fallbacks().map((chip) => [text(chip), chip.getAttribute("aria-pressed")]);
|
||||
fallbacks().find((chip) => text(chip) === "Morse").click();
|
||||
await sleep(150);
|
||||
@@ -82,9 +73,12 @@ GIBBER = """(async () => {@HELPERS@@RADIO@@KIT@
|
||||
fallbacks().find((chip) => text(chip) === "Gibberlink").click();
|
||||
await sleep(150);
|
||||
const back = [fallbacks().map((chip) => chip.getAttribute("aria-pressed")), kept()];
|
||||
const label = text(spot.querySelector("#radio-gear .radio-fallback .chips-label"));
|
||||
const label = text(spot.querySelector(".radio-mode-menu .radio-fallback .chips-label"));
|
||||
const gearFits = fits();
|
||||
await opened(false);
|
||||
press("gibberlink");
|
||||
await sleep(200);
|
||||
const button = spot.querySelector('.radio-modes button[data-mode="gibberlink"]');
|
||||
const mode = [pressed(), field("mode"), button.title, Boolean(button.querySelector("svg.bi")), Boolean(spot.querySelector(".radio-mode-menu:not([hidden])"))];
|
||||
const at = {captured: window.e2eGibber.length, pans: window.e2ePans.length};
|
||||
const playing = await sent(at.captured);
|
||||
await sleep(300);
|
||||
@@ -201,6 +195,7 @@ class TestGibberlink(HubCase):
|
||||
self.assertEqual(played["mode"][:2], [["gibberlink"], "Gibberlink"], played["mode"])
|
||||
self.assertIn("MAYDAY", played["mode"][2])
|
||||
self.assertTrue(played["mode"][3])
|
||||
self.assertFalse(played["mode"][4], "switching to Gibberlink closes the Quiet fallback menu")
|
||||
self.assertEqual(played["before"], [["Gibberlink", "true"], ["Morse", "false"], ["Hiss", "false"]])
|
||||
self.assertEqual((played["morse"], played["back"], played["label"]), ([["false", "true", "false"], "morse"], [["true", "false", "false"], "gibberlink"], "Fallback"))
|
||||
self.assertEqual((played["gearFits"], played["fits"]), ({"page": True, "panel": True}, {"page": True, "panel": True}))
|
||||
|
||||
@@ -21,6 +21,8 @@ import hub_e2e_kit as base
|
||||
from hub_e2e_kit import CHOICE_CHANNELS, OUT, WIDTHS, tone
|
||||
from hub_e2e_radio import (
|
||||
ADD_STATION,
|
||||
BELL_READ,
|
||||
BELL_SAVE,
|
||||
CALL,
|
||||
CANCELED,
|
||||
CLEAR_MAYDAY,
|
||||
@@ -28,8 +30,6 @@ from hub_e2e_radio import (
|
||||
COMPOSE_SEND,
|
||||
DLF_NODE,
|
||||
DLF_PATH,
|
||||
GEAR_READ,
|
||||
GEAR_SAVE,
|
||||
JUMPED,
|
||||
MEDIA_LOG,
|
||||
RADIO_CLICK,
|
||||
@@ -46,6 +46,8 @@ from hub_e2e_radio import (
|
||||
from hub_support import HOST_STATE
|
||||
from kvb_orchestrator import skill_scripts
|
||||
|
||||
SEND_GROUP = [["PTT", "PTT: push to transmit the message; your passkey signs it"], ["More send options", "More: send a test message only you hear"]]
|
||||
|
||||
|
||||
@unittest.skipUnless(shutil.which(os.environ.get("CHROMIUM", "chromium")), "no Chromium")
|
||||
class TestHubRadio(base.OrchestratorE2ECase):
|
||||
@@ -260,23 +262,23 @@ class TestHubRadio(base.OrchestratorE2ECase):
|
||||
with self.subTest(width=width):
|
||||
self.assertNotIn("error", result)
|
||||
self.assertEqual(result["toolbar"], ["Priority", "Day/Night", "Drain", "Suspend", "Resume", "Status"])
|
||||
self.assertEqual((result["title"], result["shown"]), ("Cancel mayday: lift the radio silence so the agents write again; your passkey signs it", ""))
|
||||
self.assertEqual((result["title"], result["shown"]), ("Cancel mayday: lift the radio silence so the agents write again; your passkey signs it", "Cancel mayday"))
|
||||
self.assertEqual(result["declined"], {"question": [question], "posted": [], "toasts": []})
|
||||
self.assertEqual(result["accepted"], {"question": [question], "posted": ["/api/board/sign", "/api/board/clear-mayday"]})
|
||||
self.assertTrue((result["done"] or "").startswith("Cancel mayday: done"), result)
|
||||
self.assertEqual(self.scripts.calls, [(skill_scripts.RADIO, ["clear", "--force", "--session", "Operator"])] * len(WIDTHS))
|
||||
|
||||
def test_chromium_sends_every_class_from_the_radio_spot_and_keeps_its_gear_settings_through_a_reload_at_three_widths(self):
|
||||
def test_chromium_sends_every_class_from_the_radio_spot_and_keeps_its_bells_through_a_reload_at_three_widths(self):
|
||||
local = f"http://localhost:{self.port}/"
|
||||
values = {1920: ("0.35", "false", "true"), 1366: ("0.45", "true", "false"), 390: ("0.55", "false", "true")}
|
||||
values = {1920: ("0.35", "off", "speak"), 1366: ("0.45", "speak", "tone"), 390: ("0.55", "tone", "speak")}
|
||||
steps = [{"width": width, "height": height, "url": f"{local}?{width}-jump#stream/radio", "wait": 1200, "probe": RADIO_JUMP, "shot": self.shot(f"{width}-radio-header-spot-every-tab")} for width, height in WIDTHS]
|
||||
for width, height in WIDTHS:
|
||||
squelch, tone, post = values[width]
|
||||
gear = GEAR_SAVE.replace("@SQUELCH@", squelch).replace("@TONE@", tone).replace("@POST@", post)
|
||||
squelch, radio_bell, post = values[width]
|
||||
bells = BELL_SAVE.replace("@SQUELCH@", squelch).replace("@RADIO@", radio_bell).replace("@POST@", post)
|
||||
steps += [
|
||||
{"width": width, "height": height, "url": f"{local}?{width}#agents/orbit", "wait": 1200, "probe": SPOT_SEND.replace("@TEXT@", f"spot {width}"), "shot": self.shot(f"{width}-radio-spot-sent")},
|
||||
{"width": width, "height": height, "url": None, "wait": 0, "probe": gear, "shot": None},
|
||||
{"width": width, "height": height, "url": f"{local}?{width}-reloaded#agents/orbit", "wait": 1200, "probe": GEAR_READ, "shot": self.shot(f"{width}-radio-spot-gear")},
|
||||
{"width": width, "height": height, "url": None, "wait": 0, "probe": bells, "shot": None},
|
||||
{"width": width, "height": height, "url": f"{local}?{width}-reloaded#agents/orbit", "wait": 1200, "probe": BELL_READ, "shot": self.shot(f"{width}-radio-spot-bells")},
|
||||
]
|
||||
data = self.drive(steps, self.authenticator())
|
||||
(OUT / "chromium-radio-spot.json").write_text(json.dumps(data, indent=1), encoding="utf-8")
|
||||
@@ -289,28 +291,27 @@ class TestHubRadio(base.OrchestratorE2ECase):
|
||||
self.assertEqual(jump, JUMPED)
|
||||
for index, (width, _) in enumerate(WIDTHS):
|
||||
sent, saved, read = walked[3 * index : 3 * (index + 1)]
|
||||
squelch, tone, post = values[width]
|
||||
squelch, radio_bell, post = values[width]
|
||||
with self.subTest(width=width):
|
||||
for probe in (sent, saved, read):
|
||||
self.assertNotIn("error", probe)
|
||||
self.assertEqual((sent["closed"], sent["open"]), ([True, "false"], [False, "true", True]))
|
||||
self.assertEqual(sent["inline"], ["static", True, True])
|
||||
self.assertEqual((sent["toolbar"], sent["channels"], sent["record"]), (["Priority", "Day/Night", "Status"], CHOICE_CHANNELS, ["Record"]))
|
||||
self.assertEqual(sent["heads"], [["Read aloud", "Read aloud: the classes and agents the radio sounds for"], ["Cancel mayday", "Cancel mayday: lift the radio silence so the agents write again; your passkey signs it"]])
|
||||
self.assertEqual((sent["heads"], sent["send"], sent["cancel"]), (0, SEND_GROUP, True))
|
||||
self.assertEqual((sent["tall"], sent["wide"]), (width == 390, False))
|
||||
self.assertEqual([run["cls"] for run in sent["runs"]], CHOICE_CHANNELS)
|
||||
for run in sent["runs"]:
|
||||
direct = run["cls"] in ("post", "call")
|
||||
self.assertEqual((run["direct"], run["question"], run["left"]), (direct, [mayday] if run["cls"] == "mayday" else [], ""), run)
|
||||
self.assertTrue((run["toast"] or "").startswith(f"{labels[run['cls']]} to {'Stage' if direct else 'all'}: sent"), run)
|
||||
self.assertEqual((saved["expanded"], saved["clashes"]), ("true", [{"found": [], "outside": []}] * 2))
|
||||
self.assertEqual(saved["clashes"], [{"found": [], "outside": []}])
|
||||
self.assertEqual(saved["tones"], ["MAYDAY / PAN-PAN", "Reviews, asks, decisions", "Post and calls to you", "All radio", "Squelch", "speak while CPU < 50 %"])
|
||||
self.assertEqual([entry[0] for entry in saved["classes"]], ["Post", "Call", "Newsletter", "Broadcast", "MAYDAY", "PAN-PAN", "Sécurité"])
|
||||
self.assertEqual([entry[1:] for entry in saved["classes"] if entry[0] == "MAYDAY"], [["true", True]])
|
||||
self.assertEqual((saved["kept"], saved["after"]), ([float(squelch), tone == "true", post == "true"], ["false", False]))
|
||||
self.assertEqual(saved["bells"], ["MAYDAY / PAN-PAN tone", "Reviews, asks, decisions tone", "Post and calls to you tone", "All radio tone"])
|
||||
self.assertEqual((saved["kept"], saved["after"]), ([float(squelch), radio_bell != "off", post == "speak"], [radio_bell, post]))
|
||||
self.assertEqual(saved["general"], {"sections": ["Ambience", "Location", "Appearance", "Music", "Notifications", "Passkey"], "radio": 0})
|
||||
self.assertEqual((saved["tall"], saved["wide"]), (width == 390, False))
|
||||
self.assertEqual(read, {"squelch": float(squelch), "tone": tone == "true", "post": post == "true", "tall": width == 390, "wide": False})
|
||||
self.assertEqual(read, {"squelch": float(squelch), "radio": radio_bell, "post": post, "tall": width == 390, "wide": False})
|
||||
heads = {"post": ["post", "--to", "Stage"], "call": ["send", "call", "--to", "Stage"], "newsletter": ["post"]}
|
||||
radio = [args for script, args in self.scripts.calls if script == skill_scripts.RADIO]
|
||||
sends = [(width, cls) for width, _ in WIDTHS for cls in CHOICE_CHANNELS]
|
||||
@@ -348,7 +349,7 @@ class TestHubRadio(base.OrchestratorE2ECase):
|
||||
self.assertNotIn("error", sent, sent)
|
||||
self.assertEqual((sent["closed"], sent["open"], sent["inline"]), ([True, "false"], [False, "true", True], ["static", True, True]))
|
||||
self.assertEqual((sent["toolbar"], sent["channels"], sent["record"]), (["Priority", "Day/Night", "Status"], CHOICE_CHANNELS, ["Record"]))
|
||||
self.assertEqual(sent["heads"], [["Read aloud", "Read aloud: the classes and agents the radio sounds for"], ["Cancel mayday", hint]])
|
||||
self.assertEqual((sent["heads"], sent["send"], sent["cancel"]), (0, SEND_GROUP, True))
|
||||
self.assertEqual((sent["tall"], sent["wide"]), (width == 390, False))
|
||||
self.assertEqual([run["cls"] for run in sent["runs"]], CHOICE_CHANNELS)
|
||||
for run in sent["runs"]:
|
||||
@@ -356,10 +357,10 @@ class TestHubRadio(base.OrchestratorE2ECase):
|
||||
self.assertEqual((run["direct"], run["question"], run["left"]), (direct, [mayday] if run["cls"] == "mayday" else [], f"spot {width} {run['cls']}"), run)
|
||||
self.assertTrue((run["toast"] or "").startswith(f"{labels[run['cls']]} to {'Stage' if direct else 'all'}: not signed"), run)
|
||||
self.assertIn("NotAllowedError", run["toast"], run)
|
||||
with self.subTest(browser="firefox", width=width, part="icon-only cancel mayday unsigned"):
|
||||
with self.subTest(browser="firefox", width=width, part="cancel mayday next to PTT unsigned"):
|
||||
self.assertNotIn("error", cleared, cleared)
|
||||
self.assertEqual(cleared["toolbar"], ["Priority", "Day/Night", "Drain", "Suspend", "Resume", "Status"])
|
||||
self.assertEqual((cleared["title"], cleared["shown"]), (hint, ""))
|
||||
self.assertEqual((cleared["title"], cleared["shown"]), (hint, "Cancel mayday"))
|
||||
self.assertEqual(cleared["declined"], {"question": [question], "posted": [], "toasts": []})
|
||||
self.assertEqual(cleared["accepted"], {"question": [question], "posted": ["/api/board/sign"]})
|
||||
self.assertTrue((cleared["done"] or "").startswith("Cancel mayday: not signed"), cleared)
|
||||
|
||||
@@ -114,8 +114,8 @@ class TestRadioLayout(kit.RadioLayoutCase):
|
||||
self.assertGreaterEqual(found["rows"], 2, home[moment])
|
||||
self.assertTrue(found["inside"], home[moment])
|
||||
self.assertTrue(found["filled"], home[moment])
|
||||
self.assertEqual(home["tools"]["gear"], ["true", True, True], home)
|
||||
self.assertEqual(home["tools"]["clear"], [True, "Cancel mayday: lift the radio silence so the agents write again; your passkey signs it"], home)
|
||||
self.assertEqual(home["tools"]["menu"], ["true", True, True], home)
|
||||
self.assertEqual(home["tools"]["cancel"], [True, "Cancel mayday: lift the radio silence so the agents write again; your passkey signs it"], home)
|
||||
content = home["content"]
|
||||
self.assertEqual(content["tiles"], [f"panel:{part}" for part in PARTS], home)
|
||||
self.assertEqual(content["radio"], [True, True, True], home)
|
||||
|
||||
@@ -144,15 +144,15 @@ class TestRadioSet(HubCase):
|
||||
shown = "50" if index == 0 or not signed else str(THRESHOLDS[base.WIDTHS[index - 1][0]])
|
||||
self.assertEqual(face["knobs"][-1][1:], ["0", "100", "10", shown])
|
||||
self.assertEqual(len(face["toneToggles"]), 4)
|
||||
self.assertEqual(face["testButtons"], [*(f"Test {knob[0]}" for knob in face["knobs"][:-1]), None])
|
||||
self.assertEqual(face["testButtons"], [*(f"Test {knob[0]}" for knob in face["knobs"][:-1]), "Radio check"])
|
||||
self.assertEqual(face["squelch"], {"lit": True, "filters": ["bandpass"], "tts": []}, face)
|
||||
self.assertEqual([label["text"] for label in face["labels"]], [*(knob[0] for knob in face["knobs"][:-1]), f"speak while CPU < {shown} %"])
|
||||
for label in face["labels"]:
|
||||
self.assertEqual((label["title"], label["row"]), (label["text"], True), label)
|
||||
self.assertTrue(label["whole"] or width == 390, label)
|
||||
self.assertEqual(face["groups"]["Classes"][4], ["MAYDAY", "true", True])
|
||||
self.assertEqual([entry[1] for entry in face["groups"]["Classes"]], ["false", "false", "false", "false", "true", "true", "true"])
|
||||
self.assertIn(["Stage", "true", False], face["groups"]["Agents"])
|
||||
self.assertEqual(face["bells"], [["MAYDAY / PAN-PAN tone", "speak"], ["Reviews, asks, decisions tone", "tone"], ["Post and calls to you tone", "tone"], ["All radio tone", "off"]])
|
||||
self.assertEqual((face["caret"], list(face["groups"]), face["menuFits"]), (["auto"], ["Fallback"], {"page": True, "panel": True}))
|
||||
self.assertEqual(face["send"], ["More send options", True])
|
||||
self.assertEqual(face["stationsHead"], "Internet radio")
|
||||
self.assertEqual(face["ptt"][0], "PTT")
|
||||
self.assertEqual([section for section in face["sections"] if section in ("Internet radio", "Tones", "Read radio aloud", "Radio")], [])
|
||||
@@ -170,6 +170,8 @@ class TestRadioSet(HubCase):
|
||||
self.assertEqual([row["line"] for row in log["narrowed"]], ["rebase done"])
|
||||
self.assertEqual(log["none"][0], 0)
|
||||
self.assertEqual(log["clearedChips"], [{"class": "", "from": "", "to": "", "agent": ""}, "", len(every)])
|
||||
self.assertTrue(log["muted"][0].startswith("Mute "), log["muted"])
|
||||
self.assertEqual((log["muted"][1:], log["unmuted"]), (["true", 1, False], ["false", 0]), log)
|
||||
self.assertEqual(log["opened"][0], True)
|
||||
self.assertTrue(log["opened"][1], log)
|
||||
self.assertEqual(log["fits"], {"page": True, "panel": True})
|
||||
@@ -265,7 +267,7 @@ class TestRadioSet(HubCase):
|
||||
self.assertEqual(keying["lamp"], ["RX", "true"])
|
||||
self.assertFalse(keying["caption"][0])
|
||||
self.assertTrue(keying["caption"][1].startswith("Stage"), keying)
|
||||
self.assertEqual((keying["gearFits"], keying["fits"]), ({"page": True, "panel": True}, {"page": True, "panel": True}), keying)
|
||||
self.assertEqual((keying["menuFits"], keying["fits"]), ({"page": True, "panel": True}, {"page": True, "panel": True}), keying)
|
||||
with self.subTest(browser=browser, width=width, part="morse stop"):
|
||||
self.assertNotIn("error", stopped, stopped)
|
||||
self.assertEqual(stopped, {"before": [True, "true", False], "cut": True, "quiet": True, "hidden": True, "later": 0}, stopped)
|
||||
|
||||
@@ -60,7 +60,7 @@ OPERATOR = """(async () => {@HELPERS@@UNLABELLED@
|
||||
["@TAG@ review", "@TAG@ ship", "@TAG@ commit"].forEach((words) => mine(words).querySelector('input[type="checkbox"]').click());
|
||||
await sleep(300);
|
||||
found.unlabelled = {main: unlabelled(document.getElementById("main"))};
|
||||
const grant = all("#main .inbox-actions button").find((button) => name(button).startsWith("Grant selection"));
|
||||
const grant = all("#grant-bar .grant-split button").find((button) => name(button).startsWith("Grant selection"));
|
||||
found.grant = name(grant);
|
||||
grant.click();
|
||||
await until(() => document.querySelector(".sheet-box .actions"), 4000);
|
||||
|
||||
Reference in new issue
Block a user