From 0738e4d47706e50a1eb1c9a6d641353e6305fc4c Mon Sep 17 00:00:00 2001 From: Transaction Science Date: Wed, 21 Oct 2026 20:28:02 -0400 Subject: [PATCH] room e2e: the window's play wait states where the seek back stood, and has the heavy bound The service scenario's "bob plays from the window" timed out at 60 s on the macOS runner under load with "last: false", which says nothing. While it waits, the check now throws the page's window mode, the view's state, the status line and the last run's counts, so a timeout reports them; and its bound is STEP * 2, as the scenario's other heavy waits are. Co-Authored-By: Claude Opus 5.5 --- .../crates/joule-moq-web/e2e/room.e2e.mjs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/joule-code/joule-code-rs/crates/joule-moq-web/e2e/room.e2e.mjs b/joule-code/joule-code-rs/crates/joule-moq-web/e2e/room.e2e.mjs index 4d716b2a7..4a37bcf01 100644 --- a/joule-code/joule-code-rs/crates/joule-moq-web/e2e/room.e2e.mjs +++ b/joule-code/joule-code-rs/crates/joule-moq-web/e2e/room.e2e.mjs @@ -598,9 +598,15 @@ async function seekBackChecks(label, p, principal, dir) { await until(`${label}: the Seek back control is enabled`, STEP, () => p.evaluate(() => !document.getElementById("seek").disabled), 250); await p.fill("#seek-s", String(SECONDS)); await p.click("#seek"); - const playing = await until(`${label}: ${p.name} plays from the window`, STEP, async () => { + // A FETCH from the window under a loaded host can take a while to start playing, so this + // wait has the bound of the other heavy ones; and while it waits it states the page's + // window mode, view, status and last run, so a timeout says where the seek back stood. + const playing = await until(`${label}: ${p.name} plays from the window`, STEP * 2, async () => { const s = await p.snap(); - return s.dvr.mode === "playing" && !(await p.evaluate(() => document.getElementById("dvr-canvas").hidden)) && s.dvr; + const [hidden, status] = await p.evaluate(() => [document.getElementById("dvr-canvas").hidden, document.getElementById("dvr-status").textContent]); + if (s.dvr.mode === "playing" && !hidden) return s.dvr; + const run = s.dvr.runs && s.dvr.runs[s.dvr.runs.length - 1]; + throw new Error(`mode ${s.dvr.mode}, view ${hidden ? "hidden" : "shown"}, status "${(status || "").slice(0, 160)}", last run ${run ? JSON.stringify({ video: run.video, audio: run.audio, playing_at: run.playing_at, live_at: run.live_at }).slice(0, 300) : "none"}`); }, 100); check(`${label}: the page shows the window's video in a view of its own while it plays`, playing.runs.length === 1, (await p.evaluate(() => document.getElementById("dvr-status").textContent)).slice(0, 200)); const done = await until(`${label}: ${p.name} returns to live`, STEP * 2, async () => { -- 2.54.0 (Apple Git-157)