Fix intermittent errors in the "check that first text field has focus" scripting test
This commit fixes the "Expected null to equal '401R'" errors that surfaced after the Puppeteer 18 upgrade. Note that even before that this would have been an improvement because it takes some time between scripting being reported ready (i.e., triggering the execution of any OpenActions) and those OpenActions actually completing execution, so it's only safe to check which element is focused if we know an element actually became focused.
This commit is contained in:
parent
9525bfaa66
commit
606fb8c394
@ -51,6 +51,7 @@ describe("Interaction", () => {
|
||||
await page.waitForFunction(
|
||||
"window.PDFViewerApplication.scriptingReady === true"
|
||||
);
|
||||
await page.waitForFunction(`window.document.activeElement !== null`);
|
||||
|
||||
// The document has an open action in order to give the focus to 401R.
|
||||
const id = await page.evaluate(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user