diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/feed-media-views-test.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/feed-media-views-test.js b/tools/feed-media-views-test.js index 14a9803..fe62413 100644 --- a/tools/feed-media-views-test.js +++ b/tools/feed-media-views-test.js @@ -128,6 +128,11 @@ try { console.log('\n[the switch]'); check('Notes / Conversations / Images / Videos / Articles sit under the chips, Notes on', await page.evaluate(() => [...document.querySelectorAll('.media-mode')].map((b) => b.textContent + (b.classList.contains('on') ? '*' : '')).join(',') === 'Notes*,Conversations,Images,Videos,Articles')); + // five chips are wider than a phone: the strip scrolls sideways, the page does not get wider + check('…the strip scrolls sideways rather than widening the page', await page.evaluate(() => { + const s = document.querySelector('.media-modes'); + return s.scrollWidth > s.clientWidth && getComputedStyle(s).overflowX === 'auto' && document.documentElement.scrollWidth <= innerWidth; + }), await page.evaluate(() => 'page ' + document.documentElement.scrollWidth + ' of ' + innerWidth)); console.log('\n[Images: a grid]'); await mode('images'); |
