test: fix toIntersectViewport test on WebKit @ Ubuntu 22.04 (#20132)

For some reason scrolling inline element into view doesn't
always work.
This commit is contained in:
Andrey Lushnikov 2023-01-16 00:11:33 -08:00 committed by GitHub
parent 8671bfc53f
commit 780e64f2c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -290,7 +290,7 @@ test.describe('toIntersectViewport', () => {
test('should work', async ({ page }) => {
await page.setContent(`
<div id=big style="height: 10000px;"></div>
<span id=small>foo</span>
<div id=small>foo</div>
`);
await expect(page.locator('#big')).toIntersectViewport();
await expect(page.locator('#small')).not.toIntersectViewport();