Files
huncode 419520e44f
Rebuild V2 candidate verification / candidate (push) Failing after 2m22s
Production container deploy / production (push) Failing after 2m43s
Record five exact R3 limited approvals and independently reviewed frozen delivery packet
2026-10-26 19:59:30 +03:00

15 lines
2.1 KiB
JavaScript

async page => {
const base='http://127.0.0.1:50541';const paths=["/", "/library", "/about", "/community", "/tools/recording-time", "/system", "/auto.shtml", "/support.shtml", "/down.shtml", "/manuals/uvr", "/manuals/svk007", "/autopredpr.shtml", "/samples.shtml", "/catalog", "/equipment/svk002-lqcd", "/equipment/svk002-gps", "/equipment/svk004", "/sert.html", "/predpr.shtml", "/manuals/two-camera", "/manuals/quickstart", "/samples/stx", "/samples/gps", "/samples/evening-zeiss", "/samples/day-zeiss", "/samples/rain", "/samples/late-evening", "/samples/roundabout", "/demo.shtml", "/reviews/svk002-mobile-news", "/faq.shtml", "/community/flash-start", "/community/usb-extension", "/this-original-page-does-not-exist"];
const rows=[], errors=[];page.on('pageerror',e=>errors.push(e.message));
for (const width of [360,1440]) {
await page.setViewportSize({width,height:900});
for (const path of paths) {
const response=await page.goto(base+path);await page.locator('main').waitFor();
await page.evaluate(async()=>{for(const im of document.images){im.loading='eager';await im.decode().catch(()=>{});}await document.fonts.ready;});
const safe=path==='/'?'home':path.slice(1).replace(/[^a-zA-Z0-9]+/g,'-');
const file='/Users/gavrilovdev/tmp/videoreg/docs/rebuild-v2/evidence/candidate-r3/'+safe+'-'+width+'.png';await page.screenshot({path:file,fullPage:true});
rows.push(await page.evaluate(({path,width,file,status})=>({path,url:location.href,width,height:innerHeight,screenshot:file,status,title:document.title,scrollWidth:document.documentElement.scrollWidth,overflow:document.documentElement.scrollWidth>innerWidth,brokenImages:[...document.images].filter(i=>!i.complete||i.naturalWidth===0).map(i=>i.src),outbound:[...document.querySelectorAll('*')].flatMap(e=>['href','src','action','poster','data'].flatMap(attr=>{const value=e.getAttribute(attr);if(!value||!/^(https?:)?\/\//i.test(value))return[];return[{element:e.tagName,attribute:attr,destination:value,context:(e.textContent||e.getAttribute('alt')||'').trim().slice(0,200)}]}))}),{path,width,file,status:response.status()}));
}
}
return {base,rows,errors};
}