diff options
| -rw-r--r-- | tools/feed-media-views-test.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/feed-media-views-test.js b/tools/feed-media-views-test.js index fe62413..58e942b 100644 --- a/tools/feed-media-views-test.js +++ b/tools/feed-media-views-test.js @@ -135,6 +135,7 @@ try { }), await page.evaluate(() => 'page ' + document.documentElement.scrollWidth + ' of ' + innerWidth)); console.log('\n[Images: a grid]'); + await page.evaluate(() => localStorage.setItem('coinos-clips-fit', 'all')); // every shape: these pictures are wide (the Tall only filter is Videos' to show) await mode('images'); check('the feed becomes a grid of its pictures, one tile each', await waitFor(() => document.querySelectorAll('.media-grid .media-tile').length === 3, 8000), String(await page.evaluate(() => document.querySelectorAll('.media-grid .media-tile').length))); @@ -161,6 +162,7 @@ try { check('Back closes the pager, leaving the grid', await page.evaluate(() => !document.querySelector('.media-pager') && !!document.querySelector('.media-grid'))); check('...and the page scrolls again', await page.evaluate(() => !document.documentElement.classList.contains('no-scroll'))); + await page.evaluate(() => localStorage.removeItem('coinos-clips-fit')); // the screen's way round again console.log('\n[the big clip in the feed]'); await mode('all'); await sleep(800); await page.evaluate(() => { const v = [...document.querySelectorAll('.note-video-box video')].find((x) => /c\.mp4/.test(x.getAttribute('src') || x.getAttribute('data-lazy-src') || '')); v.scrollIntoView({ block: 'center' }); }); |
