mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
48.14k stars 9.95k forks source link

Fix integration test "Highlight Editor Highlight with the keyboard must check that some text has been highlighted" #18276

Closed timvandermeij closed 3 months ago

timvandermeij commented 3 months ago

In PR #18273 an AFAIK new intermittent showed up. The traceback is visible in the logs from the Linux bot at http://54.241.84.105:8877/1488059b7a5d2f4/output.txt:

1) Highlight Editor Highlight with the keyboard must check that some text has been highlighted
  Message:
    In chrome: Expected false to be true.
  Stack:
        at <Jasmine>
        at file:///home/ubuntu/pdfjs/botio-files-pdfjs/private/1488059b7a5d2f4/test/integration/highlight_editor_spec.mjs:712:14
        at async Promise.all (index 1)
        at async UserContext.<anonymous> (file:///home/ubuntu/pdfjs/botio-files-pdfjs/private/1488059b7a5d2f4/test/integration/highlight_editor_spec.mjs:677:7)
  Message:
    In chrome: Expected false to be true.
  Stack:
        at <Jasmine>
        at file:///home/ubuntu/pdfjs/botio-files-pdfjs/private/1488059b7a5d2f4/test/integration/highlight_editor_spec.mjs:715:14
        at async Promise.all (index 1)
        at async UserContext.<anonymous> (file:///home/ubuntu/pdfjs/botio-files-pdfjs/private/1488059b7a5d2f4/test/integration/highlight_editor_spec.mjs:677:7)

We're doing an evaluation there, but we are probably forgetting to wait for whatever we're evaluating there to occur (that was at least the case in previous similar cases).