aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lightbox-scroll-test.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lightbox-scroll-test.js')
-rw-r--r--tools/lightbox-scroll-test.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/lightbox-scroll-test.js b/tools/lightbox-scroll-test.js
index 1eb019f..be03e9b 100644
--- a/tools/lightbox-scroll-test.js
+++ b/tools/lightbox-scroll-test.js
@@ -82,10 +82,10 @@ try {
console.log('\n[a picture, opened and closed]');
const y2 = await showPost('picture post 17'); await sleep(400);
check('the reader is somewhere else now', Math.abs(y2 - y1) > 400, `${y1} → ${y2}`);
- check('a picture opens full screen', await clickPicture() && await waitFor(() => !!document.querySelector('.lightbox'), null, 4000));
+ check('a picture opens full screen', await clickPicture() && await waitFor(() => !!document.querySelector('.lightbox, .media-pager'), null, 4000));
const under = await scrollY();
await page.keyboard.press('Escape'); await sleep(900);
- check('the picture closed', await page.evaluate(() => !document.querySelector('.lightbox')));
+ check('the picture closed', await page.evaluate(() => !document.querySelector('.lightbox, .media-pager')));
const y3 = await scrollY();
check('the feed is where it was, not jumped to the stale place or the top', Math.abs(y3 - y2) <= 2, `before ${y2}, under ${under}, after ${y3}, stale ${y1}`);