mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Set a print listener as soon as possible in the autoprint integration test
This test intermittently fails, likely because the auto-print is triggered fast enough that we don't manage to get it. So this patch aims to try to set a listener very early in order to be sure that we'll be aware that a print has been triggered.
This commit is contained in:
parent
553729869b
commit
82be74d036
2 changed files with 41 additions and 8 deletions
|
@ -46,9 +46,11 @@ function loadAndWait(filename, selector, zoom, pageSetup) {
|
|||
}
|
||||
|
||||
await page.bringToFront();
|
||||
await page.waitForSelector(selector, {
|
||||
timeout: 0,
|
||||
});
|
||||
if (selector) {
|
||||
await page.waitForSelector(selector, {
|
||||
timeout: 0,
|
||||
});
|
||||
}
|
||||
return [session.name, page];
|
||||
})
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue