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:
parent
07629e105c
commit
060ef0e15e
@ -16,7 +16,6 @@
|
|||||||
import {
|
import {
|
||||||
awaitPromise,
|
awaitPromise,
|
||||||
closePages,
|
closePages,
|
||||||
createPromise,
|
|
||||||
getEditorSelector,
|
getEditorSelector,
|
||||||
getFirstSerialized,
|
getFirstSerialized,
|
||||||
getRect,
|
getRect,
|
||||||
@ -37,6 +36,7 @@ import {
|
|||||||
unselectEditor,
|
unselectEditor,
|
||||||
waitAndClick,
|
waitAndClick,
|
||||||
waitForAnnotationModeChanged,
|
waitForAnnotationModeChanged,
|
||||||
|
waitForPointerUp,
|
||||||
waitForSelectedEditor,
|
waitForSelectedEditor,
|
||||||
waitForSerialized,
|
waitForSerialized,
|
||||||
waitForTimeout,
|
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");
|
const switchToHighlight = switchToEditor.bind(null, "Highlight");
|
||||||
|
|
||||||
describe("Highlight Editor", () => {
|
describe("Highlight Editor", () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user