aboutsummaryrefslogtreecommitdiffstats
path: root/tools/feed-video-pager-test.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-13 06:45:39 +0000
committerAdam Soltys <[email protected]>2026-10-13 06:45:39 +0000
commit8d7620874fe39b7226fb2ccfd4761b0a08b230dd (patch)
treea2b85634080073cd61dbbbf7e78028bd3baa0049 /tools/feed-video-pager-test.js
parent02ba46a2405bcf89312636f5340507b1d6d57b3b (diff)
downloadcoinosv3-8d7620874fe39b7226fb2ccfd4761b0a08b230dd.tar.gz
coinosv3-8d7620874fe39b7226fb2ccfd4761b0a08b230dd.zip
Video: the screen is never turned for a wide clip. Adam would rather a wide clip play with bars, and turn the phone himself when he wants it bigger. The pager no longer locks the screen to landscape for a wide clip (in the installed app or full screen in a tab), so it follows the phone throughout; in the installed app the pager no longer falls back to the browser's full screen either (that was only to be allowed to turn the screen). A thread's clip and a YouTube clip still go full screen on a tap, without the turn. feed-video-pager-test and fullscreen-notice-test check that nothing asks the screen to turn.
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KPw21NEpWeTGu6swVASmBt
Diffstat (limited to 'tools/feed-video-pager-test.js')
-rw-r--r--tools/feed-video-pager-test.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/feed-video-pager-test.js b/tools/feed-video-pager-test.js
index 9b014f9..add9208 100644
--- a/tools/feed-video-pager-test.js
+++ b/tools/feed-video-pager-test.js
@@ -1,8 +1,8 @@
// A clip tapped in the feed opens in the media pager, over the feed's clips
// (every shape, a post's own first), carrying on from where it was. The
-// pager takes the whole screen and a wide clip turns the phone on its side —
-// for that clip only. Each clip has a seek bar to drag; a tap pauses (and
-// shows the details), another plays on. Leaving full screen leaves the pager.
+// pager takes the whole screen; the screen isn't turned for a wide clip.
+// Each clip has a seek bar to drag; a tap pauses (and shows the details),
+// another plays on. Leaving full screen leaves the pager.
// Run: bun tools/feed-video-pager-test.js
import puppeteer from './puppeteer.js';
import { cacheKeyFor } from '../src/wallet.js';
@@ -106,7 +106,7 @@ try {
check('the tap opens the video pager', s.open);
check('…on the clip tapped', await resting('wide.webm'), await curClip());
check('…full screen', await waitFor(() => document.fullscreenElement === document.documentElement, null, 3000));
- check('…turned on its side, for a wide clip', await waitFor(() => window.__orient.includes('lock:landscape'), null, 3000), JSON.stringify((await pagerState()).orient));
+ check('…the screen not turned for a wide clip (bars; the reader turns the phone)', (await sleep(800), !(await pagerState()).orient.some((x) => x.startsWith('lock'))), JSON.stringify((await pagerState()).orient));
check('the clip in the feed holds still underneath', (await feedClip('a wide one'))?.paused);
await waitFor((cur) => { const v = eval(cur)()?.querySelector('video.mp-media'); return v && !v.paused && v.currentTime > 0; }, '(' + CUR + ')', 6000);
let v = await curVideo();
@@ -150,7 +150,6 @@ try {
console.log('\n[the next clip: a swipe away, the screen free to turn]');
await page.evaluate(() => { const sc = document.querySelector('.mp-scroll'); sc.scrollTo({ top: sc.clientHeight }); }); // what a swipe up does
check('a swipe lands on the next clip (a tall one)', await resting('tall.webm'), await curClip());
- check('…and lets the screen follow the phone', await waitFor(() => window.__orient.lastIndexOf('unlock') > window.__orient.indexOf('lock:landscape'), null, 3000), JSON.stringify((await pagerState()).orient));
check('…playing', await waitFor((cur) => { const v = eval(cur)()?.querySelector('video.mp-media'); return v && !v.paused; }, '(' + CUR + ')', 6000));
await page.keyboard.press('ArrowDown');
check('down: the last clip, past a post with none', await resting('last.webm'), await curClip());
@@ -167,7 +166,7 @@ try {
console.log('\n[leaving full screen another way (Back on a phone) leaves the pager]');
await openClip('a tall one');
check('the pager is open, full screen', await waitFor(() => !!document.querySelector('.media-pager.videos') && document.fullscreenElement === document.documentElement, null, 3000));
- check('a tall clip leaves the screen as it is', !(await pagerState()).orient.slice(1).includes('lock:landscape'), JSON.stringify((await pagerState()).orient));
+ check('a tall clip leaves the screen as it is', !(await pagerState()).orient.some((x) => x.startsWith('lock')), JSON.stringify((await pagerState()).orient));
await page.evaluate(() => document.exitFullscreen());
check('out of full screen, out of the pager', await waitFor(() => !document.querySelector('.media-pager') && !!document.querySelector('.notes-feed'), null, 3000));
check('no page errors', errs.length === 0, errs.slice(0, 2).join(' | '));