2020-12-11 06:45:14 +09:00
|
|
|
/* Copyright 2020 Mozilla Foundation
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2023-10-27 05:42:41 +09:00
|
|
|
import os from "os";
|
|
|
|
const isMac = os.platform() === "darwin";
|
|
|
|
|
2024-01-05 18:10:01 +09:00
|
|
|
function loadAndWait(filename, selector, zoom, pageSetup, options) {
|
2023-10-12 20:16:58 +09:00
|
|
|
return Promise.all(
|
2020-12-11 06:45:14 +09:00
|
|
|
global.integrationSessions.map(async session => {
|
|
|
|
const page = await session.browser.newPage();
|
2021-09-09 01:00:03 +09:00
|
|
|
|
|
|
|
// In order to avoid errors because of checks which depend on
|
|
|
|
// a locale.
|
|
|
|
await page.evaluateOnNewDocument(() => {
|
|
|
|
Object.defineProperty(navigator, "language", {
|
|
|
|
get() {
|
|
|
|
return "en-US";
|
|
|
|
},
|
|
|
|
});
|
|
|
|
Object.defineProperty(navigator, "languages", {
|
|
|
|
get() {
|
|
|
|
return ["en-US", "en"];
|
|
|
|
},
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2024-01-05 18:10:01 +09:00
|
|
|
let app_options = "";
|
|
|
|
if (options) {
|
|
|
|
// Options must be handled in app.js::_parseHashParams.
|
|
|
|
for (const [key, value] of Object.entries(options)) {
|
|
|
|
app_options += `&${key}=${encodeURIComponent(value)}`;
|
|
|
|
}
|
|
|
|
}
|
2023-10-27 05:42:41 +09:00
|
|
|
const url = `${
|
|
|
|
global.integrationBaseUrl
|
2024-01-05 18:10:01 +09:00
|
|
|
}?file=/test/pdfs/${filename}#zoom=${zoom ?? "page-fit"}${app_options}`;
|
2023-10-27 05:42:41 +09:00
|
|
|
|
2023-07-06 02:46:21 +09:00
|
|
|
await page.goto(url);
|
2023-07-28 03:12:38 +09:00
|
|
|
if (pageSetup) {
|
|
|
|
await pageSetup(page);
|
|
|
|
}
|
|
|
|
|
2020-12-11 06:45:14 +09:00
|
|
|
await page.bringToFront();
|
2023-12-09 23:00:11 +09:00
|
|
|
if (selector) {
|
|
|
|
await page.waitForSelector(selector, {
|
|
|
|
timeout: 0,
|
|
|
|
});
|
|
|
|
}
|
2020-12-11 06:45:14 +09:00
|
|
|
return [session.name, page];
|
|
|
|
})
|
|
|
|
);
|
2023-10-12 20:16:58 +09:00
|
|
|
}
|
2020-12-11 06:45:14 +09:00
|
|
|
|
2023-12-06 23:27:31 +09:00
|
|
|
function createPromise(page, callback) {
|
|
|
|
return page.evaluateHandle(
|
|
|
|
// eslint-disable-next-line no-eval
|
|
|
|
cb => [new Promise(eval(`(${cb})`))],
|
|
|
|
callback.toString()
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
function awaitPromise(promise) {
|
|
|
|
return promise.evaluate(([p]) => p);
|
|
|
|
}
|
|
|
|
|
2023-10-12 20:16:58 +09:00
|
|
|
function closePages(pages) {
|
|
|
|
return Promise.all(
|
2020-12-11 06:45:14 +09:00
|
|
|
pages.map(async ([_, page]) => {
|
2023-09-07 19:30:29 +09:00
|
|
|
// Avoid to keep something from a previous test.
|
|
|
|
await page.evaluate(() => window.localStorage.clear());
|
2023-12-09 22:12:40 +09:00
|
|
|
await page.close({ runBeforeUnload: false });
|
2020-12-11 06:45:14 +09:00
|
|
|
})
|
|
|
|
);
|
2023-10-12 20:16:58 +09:00
|
|
|
}
|
2020-11-19 02:54:26 +09:00
|
|
|
|
2024-02-11 02:21:34 +09:00
|
|
|
function waitForTimeout(milliseconds) {
|
|
|
|
/**
|
|
|
|
* Wait for the given number of milliseconds.
|
|
|
|
*
|
|
|
|
* Note that waiting for an arbitrary time in tests is discouraged because it
|
|
|
|
* can easily cause intermittent failures, which is why this functionality is
|
|
|
|
* no longer provided by Puppeteer 22+ and we have to implement it ourselves
|
|
|
|
* for the remaining callers in the integration tests. We should avoid
|
|
|
|
* creating new usages of this function; instead please refer to the better
|
|
|
|
* alternatives at https://github.com/puppeteer/puppeteer/pull/11780.
|
|
|
|
*/
|
|
|
|
return new Promise(resolve => {
|
|
|
|
setTimeout(resolve, milliseconds);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2023-10-12 20:16:58 +09:00
|
|
|
async function clearInput(page, selector) {
|
2020-11-19 02:54:26 +09:00
|
|
|
await page.click(selector);
|
2023-10-27 05:42:41 +09:00
|
|
|
await kbSelectAll(page);
|
2020-11-19 02:54:26 +09:00
|
|
|
await page.keyboard.press("Backspace");
|
2024-02-11 02:21:34 +09:00
|
|
|
await waitForTimeout(10);
|
2023-10-12 20:16:58 +09:00
|
|
|
}
|
2022-06-18 05:01:20 +09:00
|
|
|
|
|
|
|
function getSelector(id) {
|
|
|
|
return `[data-element-id="${id}"]`;
|
|
|
|
}
|
|
|
|
|
|
|
|
function getQuerySelector(id) {
|
|
|
|
return `document.querySelector('${getSelector(id)}')`;
|
|
|
|
}
|
|
|
|
|
|
|
|
function getComputedStyleSelector(id) {
|
|
|
|
return `getComputedStyle(${getQuerySelector(id)})`;
|
|
|
|
}
|
2023-10-12 20:16:58 +09:00
|
|
|
|
|
|
|
function getEditorSelector(n) {
|
|
|
|
return `#pdfjs_internal_editor_${n}`;
|
|
|
|
}
|
2022-07-22 19:13:47 +09:00
|
|
|
|
|
|
|
function getSelectedEditors(page) {
|
2022-07-29 00:59:03 +09:00
|
|
|
return page.evaluate(() => {
|
2022-07-22 19:13:47 +09:00
|
|
|
const elements = document.querySelectorAll(".selectedEditor");
|
|
|
|
const results = [];
|
|
|
|
for (const { id } of elements) {
|
2022-07-29 00:59:03 +09:00
|
|
|
results.push(parseInt(id.split("_").at(-1)));
|
2022-07-22 19:13:47 +09:00
|
|
|
}
|
|
|
|
results.sort();
|
|
|
|
return results;
|
2022-07-29 00:59:03 +09:00
|
|
|
});
|
2022-07-22 19:13:47 +09:00
|
|
|
}
|
2022-10-25 22:28:22 +09:00
|
|
|
|
2023-09-28 05:35:57 +09:00
|
|
|
async function waitForEvent(page, eventName, timeout = 5000) {
|
2023-12-06 23:27:31 +09:00
|
|
|
const handle = await page.evaluateHandle(
|
|
|
|
(name, timeOut) => {
|
|
|
|
let callback = null;
|
|
|
|
return [
|
|
|
|
Promise.race([
|
|
|
|
new Promise(resolve => {
|
|
|
|
// add event listener and wait for event to fire before returning
|
|
|
|
callback = () => resolve(false);
|
|
|
|
document.addEventListener(name, callback, { once: true });
|
|
|
|
}),
|
|
|
|
new Promise(resolve => {
|
|
|
|
setTimeout(() => {
|
|
|
|
document.removeEventListener(name, callback);
|
|
|
|
resolve(true);
|
|
|
|
}, timeOut);
|
|
|
|
}),
|
|
|
|
]),
|
|
|
|
];
|
|
|
|
},
|
|
|
|
eventName,
|
|
|
|
timeout
|
|
|
|
);
|
|
|
|
const hasTimedout = await awaitPromise(handle);
|
2023-09-28 05:35:57 +09:00
|
|
|
if (hasTimedout === true) {
|
|
|
|
console.log(`waitForEvent: timeout waiting for ${eventName}`);
|
|
|
|
}
|
2022-10-25 22:28:22 +09:00
|
|
|
}
|
2022-12-07 00:16:24 +09:00
|
|
|
|
2023-10-12 20:16:58 +09:00
|
|
|
async function waitForStorageEntries(page, nEntries) {
|
|
|
|
return page.waitForFunction(
|
2022-12-07 00:16:24 +09:00
|
|
|
n => window.PDFViewerApplication.pdfDocument.annotationStorage.size === n,
|
|
|
|
{},
|
|
|
|
nEntries
|
|
|
|
);
|
2023-10-12 20:16:58 +09:00
|
|
|
}
|
2022-12-07 00:16:24 +09:00
|
|
|
|
2023-10-12 20:16:58 +09:00
|
|
|
async function waitForSerialized(page, nEntries) {
|
|
|
|
return page.waitForFunction(
|
2023-09-28 05:35:57 +09:00
|
|
|
n =>
|
|
|
|
(window.PDFViewerApplication.pdfDocument.annotationStorage.serializable
|
|
|
|
.map?.size ?? 0) === n,
|
2022-12-07 00:16:24 +09:00
|
|
|
{},
|
2023-09-28 05:35:57 +09:00
|
|
|
nEntries
|
2022-12-07 00:16:24 +09:00
|
|
|
);
|
2023-10-12 20:16:58 +09:00
|
|
|
}
|
2023-09-28 05:35:57 +09:00
|
|
|
|
2023-10-12 20:16:58 +09:00
|
|
|
async function waitForSelectedEditor(page, selector) {
|
|
|
|
return page.waitForSelector(`${selector}.selectedEditor`);
|
|
|
|
}
|
2023-04-13 23:57:23 +09:00
|
|
|
|
2023-10-12 20:16:58 +09:00
|
|
|
async function waitForUnselectedEditor(page, selector) {
|
|
|
|
return page.waitForSelector(`${selector}:not(.selectedEditor)`);
|
|
|
|
}
|
2023-09-28 05:35:57 +09:00
|
|
|
|
2023-10-12 20:16:58 +09:00
|
|
|
async function mockClipboard(pages) {
|
|
|
|
return Promise.all(
|
2023-04-13 23:57:23 +09:00
|
|
|
pages.map(async ([_, page]) => {
|
|
|
|
await page.evaluate(() => {
|
|
|
|
let data = null;
|
|
|
|
const clipboard = {
|
|
|
|
writeText: async text => (data = text),
|
|
|
|
readText: async () => data,
|
|
|
|
};
|
|
|
|
Object.defineProperty(navigator, "clipboard", { value: clipboard });
|
|
|
|
});
|
|
|
|
})
|
|
|
|
);
|
2023-10-12 20:16:58 +09:00
|
|
|
}
|
2023-06-07 00:18:02 +09:00
|
|
|
|
2023-07-26 19:57:59 +09:00
|
|
|
async function getSerialized(page, filter = undefined) {
|
|
|
|
const values = await page.evaluate(() => {
|
2023-06-29 15:43:02 +09:00
|
|
|
const { map } =
|
|
|
|
window.PDFViewerApplication.pdfDocument.annotationStorage.serializable;
|
|
|
|
return map ? [...map.values()] : [];
|
|
|
|
});
|
2023-07-26 19:57:59 +09:00
|
|
|
return filter ? values.map(filter) : values;
|
|
|
|
}
|
2023-06-07 00:18:02 +09:00
|
|
|
|
2023-10-12 20:16:58 +09:00
|
|
|
async function getFirstSerialized(page, filter = undefined) {
|
|
|
|
return (await getSerialized(page, filter))[0];
|
|
|
|
}
|
2023-07-26 19:57:59 +09:00
|
|
|
|
2023-11-13 19:05:03 +09:00
|
|
|
function getAnnotationStorage(page) {
|
|
|
|
return page.evaluate(() =>
|
|
|
|
Object.fromEntries(
|
|
|
|
window.PDFViewerApplication.pdfDocument.annotationStorage.serializable.map?.entries() ||
|
|
|
|
[]
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
function waitForEntryInStorage(page, key, value) {
|
|
|
|
return page.waitForFunction(
|
|
|
|
(k, v) => {
|
|
|
|
const { map } =
|
|
|
|
window.PDFViewerApplication.pdfDocument.annotationStorage.serializable;
|
|
|
|
return map && JSON.stringify(map.get(k)) === v;
|
|
|
|
},
|
|
|
|
{},
|
|
|
|
key,
|
|
|
|
JSON.stringify(value)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2023-06-07 00:18:02 +09:00
|
|
|
function getEditors(page, kind) {
|
|
|
|
return page.evaluate(aKind => {
|
|
|
|
const elements = document.querySelectorAll(`.${aKind}Editor`);
|
|
|
|
const results = [];
|
|
|
|
for (const { id } of elements) {
|
|
|
|
results.push(id);
|
|
|
|
}
|
|
|
|
return results;
|
|
|
|
}, kind);
|
|
|
|
}
|
2023-07-06 22:32:11 +09:00
|
|
|
|
|
|
|
function getEditorDimensions(page, id) {
|
|
|
|
return page.evaluate(n => {
|
|
|
|
const element = document.getElementById(`pdfjs_internal_editor_${n}`);
|
|
|
|
const { style } = element;
|
2023-07-14 01:31:08 +09:00
|
|
|
return {
|
|
|
|
left: style.left,
|
|
|
|
top: style.top,
|
|
|
|
width: style.width,
|
|
|
|
height: style.height,
|
|
|
|
};
|
2023-07-06 22:32:11 +09:00
|
|
|
}, id);
|
|
|
|
}
|
|
|
|
|
2023-09-30 05:36:01 +09:00
|
|
|
async function serializeBitmapDimensions(page) {
|
|
|
|
await page.waitForFunction(() => {
|
|
|
|
try {
|
|
|
|
const map =
|
|
|
|
window.PDFViewerApplication.pdfDocument.annotationStorage.serializable
|
|
|
|
.map;
|
|
|
|
return !!map;
|
|
|
|
} catch {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2023-07-06 22:32:11 +09:00
|
|
|
return page.evaluate(() => {
|
|
|
|
const { map } =
|
|
|
|
window.PDFViewerApplication.pdfDocument.annotationStorage.serializable;
|
|
|
|
return map
|
2024-01-21 23:47:39 +09:00
|
|
|
? Array.from(map.values(), x => ({
|
|
|
|
width: x.bitmap.width,
|
|
|
|
height: x.bitmap.height,
|
|
|
|
}))
|
2023-07-06 22:32:11 +09:00
|
|
|
: [];
|
|
|
|
});
|
|
|
|
}
|
2023-08-03 03:08:09 +09:00
|
|
|
|
|
|
|
async function dragAndDropAnnotation(page, startX, startY, tX, tY) {
|
|
|
|
await page.mouse.move(startX, startY);
|
|
|
|
await page.mouse.down();
|
2024-02-11 02:21:34 +09:00
|
|
|
await waitForTimeout(10);
|
2023-08-03 03:08:09 +09:00
|
|
|
await page.mouse.move(startX + tX, startY + tY);
|
|
|
|
await page.mouse.up();
|
2023-09-28 05:35:57 +09:00
|
|
|
await page.waitForSelector("#viewer:not(.noUserSelect)");
|
2023-08-03 03:08:09 +09:00
|
|
|
}
|
2023-08-05 01:21:27 +09:00
|
|
|
|
2023-12-06 23:27:31 +09:00
|
|
|
function waitForAnnotationEditorLayer(page) {
|
|
|
|
return createPromise(page, resolve => {
|
|
|
|
window.PDFViewerApplication.eventBus.on(
|
|
|
|
"annotationeditorlayerrendered",
|
|
|
|
resolve
|
|
|
|
);
|
2023-08-05 01:21:27 +09:00
|
|
|
});
|
|
|
|
}
|
2023-09-28 05:35:57 +09:00
|
|
|
|
2023-10-03 05:45:36 +09:00
|
|
|
async function waitForTextLayer(page) {
|
2023-12-06 23:27:31 +09:00
|
|
|
const handle = await createPromise(page, resolve => {
|
|
|
|
window.PDFViewerApplication.eventBus.on("textlayerrendered", resolve);
|
2023-10-03 05:45:36 +09:00
|
|
|
});
|
2023-12-06 23:27:31 +09:00
|
|
|
return awaitPromise(handle);
|
2023-10-03 05:45:36 +09:00
|
|
|
}
|
|
|
|
|
2023-09-28 05:35:57 +09:00
|
|
|
async function scrollIntoView(page, selector) {
|
2023-12-06 23:27:31 +09:00
|
|
|
const handle = await page.evaluateHandle(
|
|
|
|
sel => [
|
|
|
|
new Promise(resolve => {
|
|
|
|
document
|
|
|
|
.getElementById("viewerContainer")
|
|
|
|
.addEventListener("scrollend", resolve, { once: true });
|
|
|
|
const element = document.querySelector(sel);
|
|
|
|
element.scrollIntoView({ behavior: "instant", block: "start" });
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
selector
|
|
|
|
);
|
|
|
|
return awaitPromise(handle);
|
2023-09-28 05:35:57 +09:00
|
|
|
}
|
2023-10-12 20:16:58 +09:00
|
|
|
|
2023-10-27 05:42:41 +09:00
|
|
|
async function hover(page, selector) {
|
|
|
|
const rect = await page.$eval(selector, el => {
|
|
|
|
const { x, y, width, height } = el.getBoundingClientRect();
|
|
|
|
return { x, y, width, height };
|
|
|
|
});
|
|
|
|
await page.mouse.move(rect.x + rect.width / 2, rect.y + rect.height / 2);
|
|
|
|
}
|
|
|
|
|
|
|
|
const modifier = isMac ? "Meta" : "Control";
|
|
|
|
async function kbCopy(page) {
|
|
|
|
await page.keyboard.down(modifier);
|
|
|
|
await page.keyboard.press("c", { commands: ["Copy"] });
|
|
|
|
await page.keyboard.up(modifier);
|
|
|
|
}
|
|
|
|
async function kbPaste(page) {
|
|
|
|
await page.keyboard.down(modifier);
|
|
|
|
await page.keyboard.press("v", { commands: ["Paste"] });
|
|
|
|
await page.keyboard.up(modifier);
|
|
|
|
}
|
|
|
|
async function kbUndo(page) {
|
|
|
|
await page.keyboard.down(modifier);
|
|
|
|
await page.keyboard.press("z");
|
|
|
|
await page.keyboard.up(modifier);
|
|
|
|
}
|
|
|
|
async function kbRedo(page) {
|
|
|
|
if (isMac) {
|
|
|
|
await page.keyboard.down("Meta");
|
|
|
|
await page.keyboard.down("Shift");
|
|
|
|
await page.keyboard.press("z");
|
|
|
|
await page.keyboard.up("Shift");
|
|
|
|
await page.keyboard.up("Meta");
|
|
|
|
} else {
|
|
|
|
await page.keyboard.down("Control");
|
|
|
|
await page.keyboard.press("y");
|
|
|
|
await page.keyboard.up("Control");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
async function kbSelectAll(page) {
|
|
|
|
await page.keyboard.down(modifier);
|
|
|
|
await page.keyboard.press("a", { commands: ["SelectAll"] });
|
|
|
|
await page.keyboard.up(modifier);
|
|
|
|
}
|
|
|
|
async function kbModifierDown(page) {
|
|
|
|
await page.keyboard.down(modifier);
|
|
|
|
}
|
|
|
|
async function kbModifierUp(page) {
|
|
|
|
await page.keyboard.up(modifier);
|
|
|
|
}
|
|
|
|
async function kbGoToEnd(page) {
|
|
|
|
if (isMac) {
|
|
|
|
await page.keyboard.down("Meta");
|
|
|
|
await page.keyboard.press("ArrowDown", {
|
|
|
|
commands: ["MoveToEndOfDocument"],
|
|
|
|
});
|
|
|
|
await page.keyboard.up("Meta");
|
|
|
|
} else {
|
|
|
|
await page.keyboard.down("Control");
|
|
|
|
await page.keyboard.press("End");
|
|
|
|
await page.keyboard.up("Control");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
async function kbGoToBegin(page) {
|
|
|
|
if (isMac) {
|
|
|
|
await page.keyboard.down("Meta");
|
|
|
|
await page.keyboard.press("ArrowUp", {
|
|
|
|
commands: ["MoveToBeginningOfDocument"],
|
|
|
|
});
|
|
|
|
await page.keyboard.up("Meta");
|
|
|
|
} else {
|
|
|
|
await page.keyboard.down("Control");
|
|
|
|
await page.keyboard.press("Home");
|
|
|
|
await page.keyboard.up("Control");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
async function kbBigMoveLeft(page) {
|
|
|
|
if (isMac) {
|
|
|
|
await page.keyboard.down("Shift");
|
|
|
|
await page.keyboard.press("ArrowLeft");
|
|
|
|
await page.keyboard.up("Shift");
|
|
|
|
} else {
|
|
|
|
await page.keyboard.down("Control");
|
|
|
|
await page.keyboard.press("ArrowLeft");
|
|
|
|
await page.keyboard.up("Control");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
async function kbBigMoveRight(page) {
|
|
|
|
if (isMac) {
|
|
|
|
await page.keyboard.down("Shift");
|
|
|
|
await page.keyboard.press("ArrowRight");
|
|
|
|
await page.keyboard.up("Shift");
|
|
|
|
} else {
|
|
|
|
await page.keyboard.down("Control");
|
|
|
|
await page.keyboard.press("ArrowRight");
|
|
|
|
await page.keyboard.up("Control");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
async function kbBigMoveUp(page) {
|
|
|
|
if (isMac) {
|
|
|
|
await page.keyboard.down("Shift");
|
|
|
|
await page.keyboard.press("ArrowUp");
|
|
|
|
await page.keyboard.up("Shift");
|
|
|
|
} else {
|
|
|
|
await page.keyboard.down("Control");
|
|
|
|
await page.keyboard.press("ArrowUp");
|
|
|
|
await page.keyboard.up("Control");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
async function kbBigMoveDown(page) {
|
|
|
|
if (isMac) {
|
|
|
|
await page.keyboard.down("Shift");
|
|
|
|
await page.keyboard.press("ArrowDown");
|
|
|
|
await page.keyboard.up("Shift");
|
|
|
|
} else {
|
|
|
|
await page.keyboard.down("Control");
|
|
|
|
await page.keyboard.press("ArrowDown");
|
|
|
|
await page.keyboard.up("Control");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
async function kbDeleteLastWord(page) {
|
|
|
|
if (isMac) {
|
|
|
|
await page.keyboard.down("Alt");
|
|
|
|
await page.keyboard.press("Backspace");
|
|
|
|
await page.keyboard.up("Alt");
|
|
|
|
} else {
|
|
|
|
await page.keyboard.down("Control");
|
|
|
|
await page.keyboard.press("Backspace");
|
|
|
|
await page.keyboard.up("Control");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-10-12 20:16:58 +09:00
|
|
|
export {
|
2023-12-06 23:27:31 +09:00
|
|
|
awaitPromise,
|
2023-10-12 20:16:58 +09:00
|
|
|
clearInput,
|
|
|
|
closePages,
|
2023-12-06 23:27:31 +09:00
|
|
|
createPromise,
|
2023-10-12 20:16:58 +09:00
|
|
|
dragAndDropAnnotation,
|
2023-11-13 19:05:03 +09:00
|
|
|
getAnnotationStorage,
|
2023-10-12 20:16:58 +09:00
|
|
|
getComputedStyleSelector,
|
|
|
|
getEditorDimensions,
|
|
|
|
getEditors,
|
|
|
|
getEditorSelector,
|
|
|
|
getFirstSerialized,
|
|
|
|
getQuerySelector,
|
|
|
|
getSelectedEditors,
|
|
|
|
getSelector,
|
|
|
|
getSerialized,
|
2023-10-27 05:42:41 +09:00
|
|
|
hover,
|
|
|
|
kbBigMoveDown,
|
|
|
|
kbBigMoveLeft,
|
|
|
|
kbBigMoveRight,
|
|
|
|
kbBigMoveUp,
|
|
|
|
kbCopy,
|
|
|
|
kbDeleteLastWord,
|
|
|
|
kbGoToBegin,
|
|
|
|
kbGoToEnd,
|
|
|
|
kbModifierDown,
|
|
|
|
kbModifierUp,
|
|
|
|
kbPaste,
|
|
|
|
kbRedo,
|
|
|
|
kbSelectAll,
|
|
|
|
kbUndo,
|
2023-10-12 20:16:58 +09:00
|
|
|
loadAndWait,
|
|
|
|
mockClipboard,
|
|
|
|
scrollIntoView,
|
|
|
|
serializeBitmapDimensions,
|
|
|
|
waitForAnnotationEditorLayer,
|
2023-11-13 19:05:03 +09:00
|
|
|
waitForEntryInStorage,
|
2023-10-12 20:16:58 +09:00
|
|
|
waitForEvent,
|
|
|
|
waitForSelectedEditor,
|
|
|
|
waitForSerialized,
|
|
|
|
waitForStorageEntries,
|
|
|
|
waitForTextLayer,
|
2024-02-11 02:21:34 +09:00
|
|
|
waitForTimeout,
|
2023-10-12 20:16:58 +09:00
|
|
|
waitForUnselectedEditor,
|
|
|
|
};
|