From 1f6fc86c1a943fc4b205cf117810a8cca0751944 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Mon, 16 Nov 2026 13:41:09 -0800 Subject: [PATCH] QA: Play on a paused story link goes on from its time --- scripts/qa-stories.mjs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/scripts/qa-stories.mjs b/scripts/qa-stories.mjs index 25e900405..bee07f4fa 100644 --- a/scripts/qa-stories.mjs +++ b/scripts/qa-stories.mjs @@ -59,6 +59,26 @@ try { ); console.log('Back and Forward restore the style, paused time and focus'); + await page.click('#tlPlay'); + const resumedAt = await ( + await page.waitForFunction( + () => { + const snap = + window.__godsEyeView.sceneDirector.getPlaybackTimingState().snapshot; + return snap?.running ? snap.sceneElapsedSec : false; + }, + { timeout: 30000 }, + ) + ).jsonValue(); + assert.ok( + resumedAt >= 1.25 && resumedAt < 3, + `Play went on from ${resumedAt} s, not the paused 1.25 s`, + ); + await page.click('#tlPlay'); + await page.waitForFunction(() => !window.__godsEyeView.sceneDirector.running); + await page.evaluate(() => window.__godsEyeView.sceneDirector.whenIdle()); + console.log('Play goes on from the paused time, not the start of the shot'); + const track = await page.$('#tlTrack'); const box = await track.boundingBox(); assert.ok(box.width > 0);