forked from mozilla/pdf.js
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix intermittent issues in the
issue14307.pdf
integration tests
The `must check input for US zip format` integration test fails pretty consistently in Puppeteer 23.4.0+ with `Expected '12341' to equal '12345'`. This is reproducible with the `pdf.sandbox.external.js` hack from mozilla#18396 (comment). Investigation uncovered two issues at play here: 1. We do two `clearInput` calls, but don't await processing of the two sandbox events that are triggered by that action. The three tests that use `issue14307.pdf` are in different `describe` blocks and therefore reload the PDF file, so we can simply remove those calls because the inputs are already empty by default. 2. We don't await processing of the sandbox events that occur after switching to another text field. This causes the expectation failure because the typing actions will happen too soon and interfere with the sandbox event processing. We solve the issue by explicitly awaiting the sandbox roundtrip. Moreover, similar to PR mozilla#19001 and mozilla#18399 we remove any remaining room for intermittent issues by directly checking for the expected value, which also results in shorter code.
- Loading branch information
1 parent
3f1d07a
commit e740809
Showing
1 changed file
with
24 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters