fix(ci): launch Firefox headed via Vitest browser option#26
Draft
PaulHax wants to merge 3 commits into
Draft
Conversation
Owner
Author
|
Why this appears to fix the Firefox WebGL CI failure:
Effective launch shape: // old effective path
firefox.launch({ headless: true })
// new effective path
firefox.launch({ firefoxUserPrefs, headless: false })Validation so far:
|
e623e36 to
25f74a9
Compare
Set `screenshotDirectory: 'Utilities/TestResults/screenshots'` on the Vitest browser provider so failure screenshots land where the existing CI test-results artifact upload already picks them up. Add `.vitest-attachments/` to .gitignore — that's the transient dir Vitest writes other browser-test attachments into, which doesn't need to be tracked.
The Vite-migration build wrote `"type": "module"` into the published package.json and stopped copying `Utilities/config/`. Two regressions vs `@kitware/[email protected]`: 1. Shipped CommonJS files (webpack-config helpers, bin CLIs) failed to load with `ReferenceError: require is not defined`. 2. `Utilities/config/*` helpers vanished — webpack/vue-CLI consumers relying on `require('@kitware/vtk.js/Utilities/config/rules-vtk')` etc. broke. Restore both: - Copy `Utilities/config/` into `dist/esm` (alongside the existing `Utilities/XMLConverter` and `Utilities/DataGenerator` copies). - Write a nested `{"type": "commonjs"}` package.json into each of the three CJS subdirs so their `.js` files load via `require()` despite the root `"type": "module"`. Node respects nearest-ancestor scope. Add a CI smoke step that packs `dist/esm`, installs the tarball in a scratch dir, then exercises three previously-regressed surfaces: extension-less `require()` of two config helpers and `--help` on the `vtkDataConverter` bin.
25f74a9 to
860e9b0
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR targets the PaulHax mirror of Kitware#3435 (
pr-3435) and contains only the CI Firefox WebGL fix.What changed:
TEST_BROWSERfrom the matrix so Vitest runs one browser per job.headless: falseoption underxvfb-run.@vitest/browser-playwrightproviderlaunchOptions, sinceinstances[].launchis not consumed by Vitest 4.1.6.Why:
The previous Firefox config used
browser.instances[].launch.headless, but Vitest 4.1.6 does not feed that field into Playwright. It effectively launched Firefox asfirefox.launch({ headless: true }), which produced the CIno webgl contextfailures. This branch feeds Firefox asfirefox.launch({ firefoxUserPrefs, headless: false }).Validation on #25:
376 passed,7 skipped,0no webgl context, and0target Proxy null.