test: retain radio schema and voice mutation checks after formatting

This commit is contained in:
Sameh Khamis committed 2026-09-12 13:01:49 -07:00
1 parent a64a622b6d
commit 233285fe12
2 files changed
+5 -5

No files matched your search

+4 -4
View File
@@ -13,8 +13,8 @@
*
* Every touched file is restored on exit, including on failure.
*
* NOTE: two mutations edit server/providers/openai/instructions.js, and a running dev server watches that
* file and restarts on every write. Writes are therefore content-guarded below
* NOTE: two mutations edit the server voice tools/instructions, and a running dev server watches those
* files and restarts on every write. Writes are therefore content-guarded below
* so the file is touched exactly twice per mutation instead of on every
* iteration — enough that a dev server survives, but expect it to restart. If
* you are mid-QA on a live server, run this before or after, not during.
@@ -460,8 +460,8 @@ const MUTATIONS = [
{
defect: 'the instruction mapping is dropped, so voice cannot reach the modes',
file: 'voiceInstructions',
from: " 'NAMED VIEWS are shorthand",
to: " // 'NAMED VIEWS are shorthand",
from: " 'NAMED VIEWS are shorthand",
to: " // 'NAMED VIEWS are shorthand",
},
];
+1 -1
View File
@@ -276,7 +276,7 @@ test('panel collapse is presentation-only and Radio exposes explicit voice playb
assert.match(voice, /'radio-panel'/);
assert.match(voice, /'radio'/);
assert.match(voice, /name:\s*'control_radio'/);
assert.match(voice, /enum:\s*\['enable', 'disable', 'play', 'resume', 'pause', 'stop', 'next', 'previous', 'volume', 'select', 'status'\]/);
assert.deepEqual(realtimeTools().find(tool => tool.name === 'control_radio').parameters.properties.action.enum, ['enable', 'disable', 'play', 'resume', 'pause', 'stop', 'next', 'previous', 'volume', 'select', 'status']);
const enableStart = ui.lastIndexOf('\n _initRadioPanel()');
const enableMethod = ui.slice(enableStart, ui.indexOf('\n _renderRadioState(state)', enableStart));
assert.doesNotMatch(enableMethod, /playSelectedRadio|togglePlayback\(\).*radio-enable/i);