From ced1268ec3e4f4fbd381231fe8e09084f1437c9a Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Sun, 9 Feb 2025 16:27:16 +0100 Subject: [PATCH] Remove the dependency between two ink editor integration tests The second test of the basic operations block for the ink editor depends on the first test to work. This becomes visible if we only run the second test, using `fit`, which always fails with: `ProtocolError: Waiting for selector '.annotationEditorLayer' failed: Runtime.callFunctionOn timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed.` The problem is that the second test doesn't enable the ink editor and relies on the first test having done that already (because we don't close the document between tests yet). This commit fixes the issue by unconditionally enabling the ink editor in the second test to remove the dependency between the two tests so they both pass in isolation. --- test/integration/ink_editor_spec.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/integration/ink_editor_spec.mjs b/test/integration/ink_editor_spec.mjs index 6fbb91acf..3e41ce469 100644 --- a/test/integration/ink_editor_spec.mjs +++ b/test/integration/ink_editor_spec.mjs @@ -113,6 +113,8 @@ describe("Ink Editor", () => { pages.map(async ([browserName, page]) => { await clearAll(page); + await switchToInk(page); + const rect = await getRect(page, ".annotationEditorLayer"); const xStart = rect.x + 300;