feat(audio): speaker panel on Race Day and Judging with quick sound switches (1.69.0)
This commit is contained in:
1 parent
299fb45c6e
commit
eb4c472ef9
9 files changed
+134
-71
No files matched your search
@@ -52,3 +52,18 @@ export async function runPracticeRankingSmoke({ evaluate, navigate, savedState,
|
||||
assert.match(await firstOnOverlay(), /2 (laps|varv)/);
|
||||
console.log("PASS open practice settings: ranking by best N laps in a row re-sorts the overlay");
|
||||
}
|
||||
|
||||
// The speaker panel lives on Race Day and Judging now (not Timing): its switches save at once.
|
||||
export async function runSpeakerPanelSmoke({ evaluate, navigate, savedState, waitFor }) {
|
||||
await navigate("race_day", "speakerPanel");
|
||||
assert.ok(await evaluate(`Boolean(document.querySelector('#speakerPanel [data-race-audio-cue="track_call"]'))`), "track call on Race Day");
|
||||
await evaluate(`(() => { const select = document.querySelector('#speakerPanel [data-speaker-audio="lapTimeCalls"]'); select.value = "off"; select.dispatchEvent(new Event("change")); })()`);
|
||||
await waitFor(async () => (await savedState()).settings.raceAudio.lapTimeCalls === "off", "lap time calls switched off from Race Day");
|
||||
await evaluate(`(() => { const select = document.querySelector('#speakerPanel [data-speaker-audio="lapTimeCalls"]'); select.value = "practice"; select.dispatchEvent(new Event("change")); })()`);
|
||||
await waitFor(async () => (await savedState()).settings.raceAudio.lapTimeCalls === "practice", "and back on");
|
||||
await navigate("judging", "speakerPanel");
|
||||
assert.ok(await evaluate(`Boolean(document.querySelector('#speakerPanel [data-race-audio-cue="marshal_warning"]'))`), "marshal warning on Judging");
|
||||
await navigate("timing", "activeSessionSelect");
|
||||
assert.equal(await evaluate(`Boolean(document.getElementById("speakerPanel"))`), false, "no longer on Timing");
|
||||
console.log("PASS speaker panel on Race Day and Judging, sound switches save at once");
|
||||
}
|
||||
Reference in new issue
Block a user