feat(report): add annotated wrinkle views and restore capture countdown
This commit is contained in:
@@ -35,7 +35,7 @@ try {
|
||||
return{ratio:f.height/i.height,top:i.top-f.top,width:i.width-f.width,other:other.height/i.height,overflow:getComputedStyle(img.parentElement).overflow};
|
||||
});
|
||||
assert(Math.abs(crop.ratio-.9)<.002);assert(Math.abs(crop.top)<1);assert(Math.abs(crop.width)<1);
|
||||
assert(Math.abs(crop.other-1)<.002);assert.equal(crop.overflow,'hidden');
|
||||
assert(Math.abs(crop.other-.9)<.002,'wrinkle front frame matches contour crop');assert.equal(crop.overflow,'hidden');
|
||||
const offset=await page.locator('#ditem-img1').getAttribute('data-content-offset');
|
||||
assert(offset!=null&&Number(offset)>=0&&Number(offset)<=.090001);
|
||||
const fullFront=await page.locator('#ditem-img1').getAttribute('src');
|
||||
@@ -49,8 +49,8 @@ try {
|
||||
const m=new DOMMatrix(getComputedStyle(e).transform),r=e.getBoundingClientRect(),b=e.parentElement.getBoundingClientRect();
|
||||
return{sx:m.a,sy:m.d,shift:m.f/b.height,top:r.top-b.top,bottom:r.bottom-b.bottom};
|
||||
});
|
||||
assert(Math.abs(fill.sx-1.3)<.001);assert(Math.abs(fill.sy-1.3)<.001);assert(Math.abs(fill.shift-.15)<.001);
|
||||
assert(Math.abs(fill.top)<1&&fill.bottom>0,'zoomed fill covers frame without blank top edge');
|
||||
assert(Math.abs(fill.sx-2.8)<.001);assert(Math.abs(fill.sy-2.8)<.001);assert(Math.abs(fill.shift-(-.25))<.001);
|
||||
assert(fill.top<=.01&&fill.bottom>0,'zoomed fill covers frame without blank top edge');
|
||||
}
|
||||
const spacing=await page.locator('#contour-sides').evaluate(e=>{
|
||||
const frame=document.querySelector('.contour-front-frame'),f=frame.getBoundingClientRect(),s=e.getBoundingClientRect();
|
||||
|
||||
Reference in New Issue
Block a user