-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
Description
Attach (recommended) or Link to PDF file
N/A
Web browser and its version
Firefox 139.0.1
Operating system and its version
Arch Linux
PDF.js version
5.3.31
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
- Apply the following diff to the find bar code on
master:
diff --git a/web/pdf_find_bar.js b/web/pdf_find_bar.js
index d76d4fe3d..7cc957128 100644
--- a/web/pdf_find_bar.js
+++ b/web/pdf_find_bar.js
@@ -166,7 +166,8 @@ class PDFFindBar {
}
}
- open() {
+ async open() {
+ await new Promise(r => setTimeout(r, 2000));
if (!this.opened) {
// Potentially update the findbar layout, row vs column, when:
// - The width of the viewer itself changes.
- Apply the following diff to only run the find integration tests:
diff --git a/test/integration/find_spec.mjs b/test/integration/find_spec.mjs
index 2f3ef1e15..fe7003151 100644
--- a/test/integration/find_spec.mjs
+++ b/test/integration/find_spec.mjs
@@ -24,7 +24,7 @@ function fuzzyMatch(a, b, browserName, pixelFuzz = 3) {
.toBeGreaterThan(b - pixelFuzz);
}
-describe("find bar", () => {
+fdescribe("find bar", () => {
describe("highlight all", () => {
let pages;
- Run
npx gulp integrationtest.
What is the expected behavior?
The integration tests pass (i.e. do not depend on how long it takes to open the find bar).
What went wrong?
The integration tests fail (i.e. do depend on how long it takes to open the find bar).
Link to a viewer
No response
Additional context
This issue was found during code inspection for another integration test.
Reactions are currently unavailable