1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

Remove timeouts from the copy_paste integration test

This commit is contained in:
Calixte Denizet 2023-10-02 22:45:36 +02:00
parent 59d94b549f
commit bb59f445a9
2 changed files with 70 additions and 24 deletions

View file

@ -253,6 +253,15 @@ async function waitForAnnotationEditorLayer(page) {
}
exports.waitForAnnotationEditorLayer = waitForAnnotationEditorLayer;
async function waitForTextLayer(page) {
return page.evaluate(() => {
return new Promise(resolve => {
window.PDFViewerApplication.eventBus.on("textlayerrendered", resolve);
});
});
}
exports.waitForTextLayer = waitForTextLayer;
async function scrollIntoView(page, selector) {
const promise = page.evaluate(
sel =>