Skip to content

Commit e90e614

Browse files
committed
Diagnosticar recursos externos nas capturas PNG
1 parent 557094e commit e90e614

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎test_portal_browser.mjs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ for(const viewport of [{width:1440,height:900},{width:390,height:844}]){
5757
});
5858
await page.locator('#torcida .image-export-actions').waitFor({state:'visible',timeout:15000});
5959
await check(label+' image export preserves page styling and credits',async()=>{
60+
const resources=await page.evaluate(()=>[...document.querySelectorAll('#torcida,#torcida *')].map(el=>({tag:el.tagName,id:el.id,src:el.currentSrc||el.src||'',bg:getComputedStyle(el).backgroundImage,mask:getComputedStyle(el).maskImage})).filter(x=>x.src||x.bg!=='none'||x.mask!=='none'));
61+
console.log(label+' export image resources '+JSON.stringify(resources));
6062
const result=await page.evaluate(async()=>{
6163
const c=await exportPortalCanvas(['torcida','Para quem devo torcer',['#supportList'],['simGoal']]);
6264
const p=[...c.getContext('2d').getImageData(5,5,1,1).data].slice(0,3);

0 commit comments

Comments
 (0)