diff --git a/test/integration/highlight_editor_spec.mjs b/test/integration/highlight_editor_spec.mjs index 931ff440a4439..633b1c8e3894e 100644 --- a/test/integration/highlight_editor_spec.mjs +++ b/test/integration/highlight_editor_spec.mjs @@ -1802,6 +1802,9 @@ describe("Highlight Editor", () => { y = rect.y - rect.height; await page.mouse.move(x, y); await page.mouse.down(); + await page.waitForSelector( + `.page[data-page-number = "1"] .annotationEditorLayer.drawing` + ); for ( const endY = rect.y + 2 * rect.height; y <= endY; @@ -1811,6 +1814,9 @@ describe("Highlight Editor", () => { } await page.mouse.up(); await awaitPromise(clickHandle); + await page.waitForSelector( + `.page[data-page-number = "1"] .annotationEditorLayer:not(.drawing)` + ); const { count } = await counterHandle.jsonValue(); expect(count).withContext(`In ${browserName}`).toEqual(0);