diff options
| author | Adam Soltys <[email protected]> | 2026-10-22 09:23:47 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-22 09:23:47 -0700 |
| commit | 178842f26f9fce19e9148cbb9f0e9f1aed9131f7 (patch) | |
| tree | 60fc5a576345b5b1c31de8fff4d64a4f71a14863 /tools | |
| parent | f3a3d88c7d5a86ae1fa06cf23932631eaa050151 (diff) | |
| download | coinosv3-178842f26f9fce19e9148cbb9f0e9f1aed9131f7.tar.gz coinosv3-178842f26f9fce19e9148cbb9f0e9f1aed9131f7.zip | |
Videos on a desktop: moving the mouse over a playing clip brings the seek bar up, and it fades about 2 s after the mouse goes still (it stays while the pointer rests on the bar)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/pager-seek-hide-test.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/pager-seek-hide-test.js b/tools/pager-seek-hide-test.js index d5d527b..f25ff49 100644 --- a/tools/pager-seek-hide-test.js +++ b/tools/pager-seek-hide-test.js @@ -104,7 +104,15 @@ try { await page.mouse.click(195, 380); check('a tap mid-screen pauses the clip, and the bar is up', await waitFor(() => { const b = document.querySelector('.mp-slide.mp-cur .mp-seek'); return getComputedStyle(b).opacity === '1'; }, null, 2000) && !(await curBar()).playing, JSON.stringify(await curBar())); await page.mouse.click(195, 380); - check('…another plays it on, the bar gone', await waitFor(() => getComputedStyle(document.querySelector('.mp-slide.mp-cur .mp-seek')).opacity === '0', null, 2000) && (await curBar()).playing, JSON.stringify(await curBar())); + // (the test's mouse moved to click, which a desktop answers with the bar for a moment) + check('…another plays it on, the bar gone', await waitFor(() => getComputedStyle(document.querySelector('.mp-slide.mp-cur .mp-seek')).opacity === '0', null, 3500) && (await curBar()).playing, JSON.stringify(await curBar())); + // a mouse (a desktop) brings it up by moving, and it fades once the mouse is still + await page.waitForFunction(() => getComputedStyle(document.querySelector('.mp-slide.mp-cur .mp-seek')).opacity === '0', { timeout: 6000 }).catch(() => {}); + for (let i = 0; i < 5; i++) { await page.mouse.move(150 + i * 20, 300 + i * 10); await sleep(60); } + check('a mouse moving over the clip brings the bar up, the clip playing on', await waitFor(() => getComputedStyle(document.querySelector('.mp-slide.mp-cur .mp-seek')).opacity === '1', null, 1500) && (await curBar()).playing, JSON.stringify(await curBar())); + const stillAt = Date.now(); + check('…and it fades once the mouse is still', await waitFor(() => getComputedStyle(document.querySelector('.mp-slide.mp-cur .mp-seek')).opacity === '0', null, 4000), JSON.stringify(await curBar())); + check('…a couple of seconds later, not the tap\'s longer wait', Date.now() - stillAt < 3200, (Date.now() - stillAt) + ' ms'); await page.mouse.click(195, 844 - 70); // up again, for the glide check('the pager is not marked moving', await page.evaluate(() => !document.querySelector('.media-pager').classList.contains('moving'))); check('the position counter has faded out', await waitFor(() => +getComputedStyle(document.querySelector('.mp-position')).opacity < 0.01, null, 4000), String(await counterOpacity())); |
