This installs pdf.js in a selection of CI jobs. Previously the PDF.js tests (in qutescheme.feature) were skipped in CI because it wasn't installed anywhere. There has been a couple of recent cases where pdf.js started depending on javascript features that are too new for even the most recent QtWebEngine to support. The aim of this commit is to catch that case. This doesn't add coverage for older webengine releases. This also incidentally updates the ace editor in these test jobs, since that is also updated by default by the update_3rdparty script. Hopefully that doesn't cause issues. The reasoning for installing on each type of job: *ubuntu jobs*: not installed - while our main test runs are on ubuntu there is an upstream issue where many assets used by pdf.js (like icons used in the toolbar) aren't packaged, see #7904. This causes warning messages because assets requested via qutescheme can't be found, which causes the tests to fail. We could a) install pdf.js from source instead of using the ubuntu one b) ignore the warning logs c) skip this environment and rely on tests elsewhere. I've chosen to do (c). I don't see a huge benefit in testing pdf.js across multiple environments if we aren't using it installed from the OS anyway. We could install from source but currently all the Qt < 6.5 tests are failing from some other JS error, and I think fixing that is out of scope of this issue. *docker Qt6*: installed - the archlinux pdfjs package works fine and we are only testing the most recent Qt versions because arch users are expected to stay up to date. *docker Qt5*: not installed - doesn't support JS features required by PDF.js. I guess we could install the legacy build from source here. I'm mostly worried about catching new breakages for this commit though *windows*: installed - we install pdf.js from source when making a release so it would be nice to do that in tests too. *macos*: not installed - the tests that were catching the breakages are end2end tests which we don't run on mac. And I think there was an error from the :versions tests here, don't remember. *bleeding edge*: installed - from source pdf.js tests fail on Qt < 6.5 with `Uncaught TypeError: Cannot read properties of null (reading 'mainContainer')` The `TestPDFJSVersion.test_real_file` unit tests currently fails because `version._pdfjs_version()` returns `unknown (bundled)`, not sure why. I think this is pre-existing and it also wasn't being run on CI. |
||
|---|---|---|
| .. | ||
| ISSUE_TEMPLATE | ||
| workflows | ||
| CODEOWNERS | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.asciidoc | ||
| FUNDING.yml | ||
| SECURITY.md | ||
| dependabot.yml | ||
| pull_request_template.md | ||