QA: Play on a paused story link goes on from its time

This commit is contained in:
Sameh Khamis committed 2026-11-16 13:41:09 -08:00
1 parent 20f6ceb74c
commit 1f6fc86c1a
1 file changed
+20
+20
View File
@@ -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);