Files
progcode/docs/design-system/concept-v3/root-first-smoke.js
T
huncode 12562baeb5
Build and deploy / deploy (push) Successful in 2m39s
Implement ProgCode identity and real shared reading UI kit
2026-10-27 15:19:49 +03:00

2 lines
976 B
JavaScript

async page=>{const results=[];const errors=[];page.on('pageerror',e=>errors.push(String(e)));for(const width of [1440,390,320]){await page.setViewportSize({width,height:900});for(const view of ['home','catalog','article','kit']){await page.goto('http://127.0.0.1:54623/#'+view);await page.evaluate(()=>document.fonts.ready);await page.screenshot({path:'/Users/gavrilovdev/tmp/progcode.ru/docs/design-system/concept-v3/root-'+view+'-'+width+'.png'});results.push(await page.evaluate(()=>({url:location.href,width:innerWidth,doc:document.documentElement.scrollWidth,title:document.querySelector('main>section:not([hidden]) h1')?.textContent,images:[...document.querySelectorAll('main>section:not([hidden]) img')].map(i=>({src:i.getAttribute('src'),complete:i.complete,width:i.naturalWidth})),visibleText:document.querySelector('main>section:not([hidden])')?.innerText.length})));}}return{scope:'standalone concept smoke, not creative acceptance or production',results,errors};}