Files
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
1.1 KiB
JavaScript

async page=>{const base='http://127.0.0.1:50480',out='/tmp/progcode-cd-f5/evidence',rows=[];await page.setViewportSize({width:390,height:900});for(const [name,path,selector]of[['media','/articles/bitrix-api-add-foto-editor/','figure'],['short','/articles/'+encodeURIComponent('привет-мир')+'/','main'],['404','/missing-f5-creative/','main'],['table','/articles/'+encodeURIComponent('новый-движок-ctfe')+'/','.table-scroll']]){const r=await page.goto(base+path);await page.locator(selector).first().scrollIntoViewIfNeeded();if(name==='media')await page.locator('figure img').first().evaluate(e=>e.decode());await page.screenshot({path:`${out}/${name}-390-dark.png`});rows.push({name,status:r.status(),...await page.evaluate(()=>({pageWidth:document.documentElement.scrollWidth,images:[...document.querySelectorAll('img')].map(e=>({src:e.getAttribute('src'),loaded:e.complete&&e.naturalWidth>0}))}))});}await page.goto(base+'/');await page.keyboard.press('Tab');rows.push({name:'skip',focus:await page.evaluate(()=>document.activeElement.textContent)});return rows;}