From 76c3077a6943d9413e87b2ad2813353b2912efb6 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Tue, 24 Sep 2024 12:02:40 +0200 Subject: [PATCH] test: retry oopif boundingBox assertions (#32787) --- tests/library/chromium/oopif.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/library/chromium/oopif.spec.ts b/tests/library/chromium/oopif.spec.ts index bea16bdb75..3878aa5142 100644 --- a/tests/library/chromium/oopif.spec.ts +++ b/tests/library/chromium/oopif.spec.ts @@ -269,7 +269,7 @@ it('ElementHandle.boundingBox() should work', async function({ page, browser, se await assertOOPIFCount(browser, 1); const handle1 = await page.frames()[1].$('.box:nth-of-type(13)'); - expect(await handle1!.boundingBox()).toEqual({ x: 100 + 42, y: 50 + 17, width: 50, height: 50 }); + await expect.poll(() => handle1!.boundingBox()).toEqual({ x: 100 + 42, y: 50 + 17, width: 50, height: 50 }); await Promise.all([ page.frames()[1].waitForNavigation(), @@ -277,7 +277,7 @@ it('ElementHandle.boundingBox() should work', async function({ page, browser, se ]); await assertOOPIFCount(browser, 0); const handle2 = await page.frames()[1].$('.box:nth-of-type(13)'); - expect(await handle2!.boundingBox()).toEqual({ x: 100 + 42, y: 50 + 17, width: 50, height: 50 }); + await expect.poll(() => handle2!.boundingBox()).toEqual({ x: 100 + 42, y: 50 + 17, width: 50, height: 50 }); }); it('should click', async function({ page, browser, server }) {