1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-24 09:08:07 +02:00

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.
This commit is contained in:
Tim van der Meij 2025-02-23 19:03:29 +01:00
parent 07629e105c
commit 060ef0e15e
No known key found for this signature in database
GPG key ID: 8C3FD2925A5F2762

View file

@ -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", () => {