fix: keep presentation toolbar visible on narrow phones
Build and publish Eldorado documentation / build (pull_request) Successful in 47s
Build and publish Eldorado documentation / build (pull_request) Successful in 47s
This commit is contained in:
1 parent
f059f4c324
commit
6b38b128d4
2 files changed
+2
No files matched your search
@@ -44,6 +44,7 @@ const fs=require('node:fs'); const assert=require('node:assert/strict');
|
||||
await page.getByRole('link',{name:'Portal',exact:true}).click();await page.waitForURL(base+root);await page.getByRole('link',{name:/Open presentation/}).scrollIntoViewIfNeeded();await page.screenshot({path:`${out}/${viewport.width}-homepage.png`});await page.getByRole('link',{name:/Open presentation/}).click();await page.waitForFunction(()=>window.Reveal?.isReady());
|
||||
assert.deepEqual(errors,[]);results.push({viewport,slides:19,overflow:false,errors,deepLinkRefresh:true,keyboard:true,overview:true,links:true,touch:viewport.width!==1440});await context.close();
|
||||
}
|
||||
const narrow=await browser.newPage({viewport:{width:320,height:720}});await narrow.goto(url,{waitUntil:'networkidle'});await narrow.evaluate(()=>document.fonts.ready);assert(await narrow.evaluate(()=>document.querySelector('.toolbar').scrollWidth<=innerWidth),'320px toolbar must not clip Print');await narrow.screenshot({path:out+'/320-toolbar.png'});await narrow.close();
|
||||
const page=await browser.newPage({viewport:{width:1440,height:900}});await page.goto(url+'?print-pdf',{waitUntil:'networkidle'});await page.waitForFunction(()=>document.querySelectorAll('.pdf-page').length===19);await page.pdf({path:out+'/print.pdf',preferCSSPageSize:true,printBackground:true});
|
||||
assert.equal(await page.locator('.pdf-page').count(),19);
|
||||
fs.writeFileSync(`${out}/results.json`,JSON.stringify({results,printPages:19},null,2));console.log('PASS: 57 slide views, bounds, refresh/hash, keyboard, overview, touch, fullscreen, notes, all links, homepage, print');
|
||||
|
||||
Reference in new issue
Block a user