From fb14a07cb07d12848676555b5a93d2726321a031 Mon Sep 17 00:00:00 2001 From: Nawid3333 <102778966+Nawid3333@users.noreply.github.com> Date: Sat, 10 Oct 2026 23:12:15 +0200 Subject: [PATCH] e2e: the fullscreen bar case waits for the player's video before it plays at being played The source's setup resets the player (big play button back, not playing). On CI's slower runners, and once in six local runs, that reset came after the case set its playing state, and the bar rightly stayed up (its report: bigPlay true, playing false). Co-Authored-By: Claude Opus 5.5 --- tests/e2e/classic-specs/content-overlays.e2e.mjs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/e2e/classic-specs/content-overlays.e2e.mjs b/tests/e2e/classic-specs/content-overlays.e2e.mjs index b8ffde48..97abbba7 100644 --- a/tests/e2e/classic-specs/content-overlays.e2e.mjs +++ b/tests/e2e/classic-specs/content-overlays.e2e.mjs @@ -572,8 +572,13 @@ describe('A site\'s overlays around an in-page player', function() { return frame.isExisting(); }, {timeout: 15000, timeoutMsg: 'the player never came up'}); await browser.switchFrame(frame); - await browser.waitUntil(() => browser.execute(() => !!window.fastStream?.interfaceController), - {timeout: 15000, timeoutMsg: 'the player never started'}); + // Its video loaded, not just the interface there: setting the source resets the player + // (big play button back, not playing), and that could come after the playing state set + // below, and the bar rightly stayed up (2026-10-10: main and #422 on CI, once in six runs + // locally; the case's report read bigPlay true, playing false). + await browser.waitUntil(() => browser.execute(() => !!window.fastStream?.source && + window.fastStream.player?.getVideo?.()?.readyState >= 1), + {timeout: 15000, timeoutMsg: 'the player never loaded its video'}); await browser.execute(() => { window.fastStream.interfaceController.hideBigPlayButton(); window.fastStream.state.playing = true;