Deduplicate the getXY helper function in the highlight editor integration tests
The helper function is available in `test_utils.mjs` since commit 301f1bb, so by exporting it there it can be reused.
This commit is contained in:
parent
4f3dbcf24d
commit
07629e105c
@ -22,6 +22,7 @@ import {
|
|||||||
getRect,
|
getRect,
|
||||||
getSerialized,
|
getSerialized,
|
||||||
getSpanRectFromText,
|
getSpanRectFromText,
|
||||||
|
getXY,
|
||||||
kbBigMoveLeft,
|
kbBigMoveLeft,
|
||||||
kbBigMoveUp,
|
kbBigMoveUp,
|
||||||
kbFocusNext,
|
kbFocusNext,
|
||||||
@ -60,11 +61,6 @@ const waitForPointerUp = page =>
|
|||||||
|
|
||||||
const switchToHighlight = switchToEditor.bind(null, "Highlight");
|
const switchToHighlight = switchToEditor.bind(null, "Highlight");
|
||||||
|
|
||||||
const getXY = async (page, selector) => {
|
|
||||||
const rect = await getRect(page, selector);
|
|
||||||
return `${rect.x}::${rect.y}`;
|
|
||||||
};
|
|
||||||
|
|
||||||
describe("Highlight Editor", () => {
|
describe("Highlight Editor", () => {
|
||||||
describe("Editor must be removed without exception", () => {
|
describe("Editor must be removed without exception", () => {
|
||||||
let pages;
|
let pages;
|
||||||
|
|||||||
@ -901,6 +901,7 @@ export {
|
|||||||
getSelector,
|
getSelector,
|
||||||
getSerialized,
|
getSerialized,
|
||||||
getSpanRectFromText,
|
getSpanRectFromText,
|
||||||
|
getXY,
|
||||||
hover,
|
hover,
|
||||||
isCanvasWhite,
|
isCanvasWhite,
|
||||||
isVisible,
|
isVisible,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user