From 060ef0e15e8147457cbad75f229dd7c5b2ba3793 Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Sun, 23 Feb 2025 19:03:29 +0100 Subject: [PATCH] Deduplicate the `waitForPointerUp` helper function in the highlight editor integration tests The helper function is available in `test_utils.mjs` since commit 3fe55ba, so we can remove the local copy by importing it. --- test/integration/highlight_editor_spec.mjs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test/integration/highlight_editor_spec.mjs b/test/integration/highlight_editor_spec.mjs index e24698ca5..6241195d2 100644 --- a/test/integration/highlight_editor_spec.mjs +++ b/test/integration/highlight_editor_spec.mjs @@ -16,7 +16,6 @@ import { awaitPromise, closePages, - createPromise, getEditorSelector, getFirstSerialized, getRect, @@ -37,6 +36,7 @@ import { unselectEditor, waitAndClick, waitForAnnotationModeChanged, + waitForPointerUp, waitForSelectedEditor, waitForSerialized, waitForTimeout, @@ -54,11 +54,6 @@ const selectAll = async page => { ); }; -const waitForPointerUp = page => - createPromise(page, resolve => { - window.addEventListener("pointerup", resolve, { once: true }); - }); - const switchToHighlight = switchToEditor.bind(null, "Highlight"); describe("Highlight Editor", () => {