feat(orchestrator): add a Squelch test button to the radio device card
Test Squelch plays the burst of a radio row at the All radio volume times the squelch, like the test buttons of the four tone rows; the threshold row has none (operator 2026-11-17). The radio set e2e asserts the test buttons per knob row and that the burst lights the lamp through the bandpass filter without speech; 004 names the rule. 🎯 Fix: 95 % 💥 Break: 2 % 💸 Tokens: 100 % ⏱️ Velocity: 100 % 🛡️ Security: 100 % 🏆 Score: 93 🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 % Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
53a69daeaf
commit
e9cd1aeda5
4 files changed
+15
-4
No files matched your search
@@ -132,10 +132,16 @@ FACE = """(async () => {@HELPERS@@RADIO@
|
||||
const label = row.querySelector(".knob-label");
|
||||
return {text: text(label), title: label.title, whole: label.scrollWidth <= label.clientWidth + 1, row: row.scrollWidth <= row.clientWidth + 1};
|
||||
});
|
||||
const testButtons = all(".radio-knobs .knob-row", spot).map((row) => (row.querySelector(".knob-test") ? name(row.querySelector(".knob-test")) : null));
|
||||
const atTest = mark();
|
||||
all(".radio-knobs .knob-test", spot).find((button) => name(button) === "Test Squelch").click();
|
||||
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])]));
|
||||
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])]));
|
||||
const stationsHead = text(spot.querySelector(".radio-station .group-title"));
|
||||
const ptt = spot.querySelector('form.composer button[type="submit"]');
|
||||
const pageFits = fits();
|
||||
@@ -149,7 +155,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, 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, groups, 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);
|
||||
|
||||
@@ -142,6 +142,8 @@ 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["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)
|
||||
|
||||
Reference in new issue
Block a user