Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

test: attempt to unflake webkit test (#13935)

Andrey Lushnikov1521afbb5f74
diff --git a/tests/page/locator-misc-2.spec.ts b/tests/page/locator-misc-2.spec.ts
index 5bcaa1fcc5..2ce1116e75 100644
--- a/tests/page/locator-misc-2.spec.ts
+++ b/tests/page/locator-misc-2.spec.ts
@@ -69,8 +69,7 @@ it('should scroll zero-sized element into view', async ({ page, isAndroid }) =>
`);
expect(await page.locator('#lazyload').boundingBox()).toEqual({ x: 0, y: 2020, width: 1280, height: 0 });
await page.locator('#lazyload').scrollIntoViewIfNeeded();
- await page.evaluate(() => new Promise(requestAnimationFrame));
- expect(await page.locator('#lazyload').textContent()).toBe('LAZY LOADED CONTENT');
+ await expect(page.locator('#lazyload')).toHaveText('LAZY LOADED CONTENT');
expect(await page.locator('#lazyload').boundingBox()).toEqual({ x: 0, y: 720, width: 1280, height: 20 });
});