Merge pull request #20380 from timvandermeij/integration-tests-tweak-viewer-scroll
Tweak the "scroll into view" viewer integration test
This commit is contained in:
commit
a40df9a5be
@ -1453,10 +1453,12 @@ describe("PDF viewer", () => {
|
|||||||
const rect = await getRect(page, annotationSelector);
|
const rect = await getRect(page, annotationSelector);
|
||||||
const containerRect = await getRect(page, "#viewerContainer");
|
const containerRect = await getRect(page, "#viewerContainer");
|
||||||
expect(
|
expect(
|
||||||
Math.abs(2 * (rect.y - containerRect.y) - containerRect.height)
|
Math.abs(
|
||||||
|
2 * (Math.ceil(rect.y) - containerRect.y) - containerRect.height
|
||||||
|
)
|
||||||
)
|
)
|
||||||
.withContext(`In ${browserName}`)
|
.withContext(`In ${browserName}`)
|
||||||
.toBeLessThan(1);
|
.toBeLessThanOrEqual(1);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user