diff --git a/tests/e2e/file-view-render.test.ts b/tests/e2e/file-view-render.test.ts index 707a82a02b..a90a06331c 100644 --- a/tests/e2e/file-view-render.test.ts +++ b/tests/e2e/file-view-render.test.ts @@ -35,7 +35,7 @@ test('pdf file', async ({page, request}) => { await page.goto(`/${owner}/${repoName}/src/branch/main/test.pdf`); const container = page.locator('.file-view-render-container'); await expect(container).toHaveAttribute('data-render-name', 'pdf-viewer'); - expect((await container.boundingBox())!.height).toBeGreaterThan(300); + await expect.poll(async () => (await container.boundingBox())!.height).toBeGreaterThan(300); await assertFlushWithParent(container, page.locator('.file-view')); });