test(app): make open-in-browser DOM fixture hermetic for the Coverage gate - #1293
Merged
Conversation
… gate The file-workbench open-in-browser suite (#1290) failed the ci-coverage gate: its Vite fixture could not resolve @ericsanchezok/synergy-plugin/theme (the exports map serves import from gitignored dist/) and the real Lingui runtime pulls @messageformat/parser (CJS) whose named import breaks under dependency pre-bundling, so the page 500'd and every case timed out. Port the ThemePicker fixture mitigations: alias plugin theme to source, stub the Lingui runtime, pre-bundle the Solid runtime with noDiscovery, scope the optimizer cache to the fixture, warm the module graph before the browser connects, surface page/console/HTTP errors, and register the suite in playwrightIsolated so worker reaping cannot kill Chromium. Co-authored-by: synergy-agent <299070056+synergy-agent@users.noreply.github.com>
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.
Summary
Fixes the red
Coveragegate ondev(and the failingAll checks passedsummary job). Thefile-workbench open-in-browserDOM suite added in #1290 fails in theci-coveragejob: its Vite fixture can't resolve@ericsanchezok/synergy-plugin/theme(the plugin exports map servesimportfrom gitignoreddist/theme/index.js, and the Coverage job runs no build step), and the real Lingui runtime pulls@messageformat/parser(CJS) whose namedparseimport breaks under Vite's dependency pre-bundling. The page 500s and every case times out after 30s (ECONNREFUSEDin the gate's failure signals), which also zeroespackages/appcoverage.Ports the mitigations
ThemePicker.behavior.test.tsxalready accumulated (e7fbc3974,43c4905ad,cd63660e5) to this fixture:@ericsanchezok/synergy-plugin/themeto its source entry@lingui/solid,@lingui/core) since the suite asserts chrome/click behavior, not i18n renderingoptimizeDeps.include+noDiscovery: truecacheDirto the fixture temp dir so sibling Playwright servers don't invalidate each other's optimizer cachewarmupRequestthe fixture before the browser connects; surface page/console/HTTP errors instead of bare selector timeoutsplaywrightIsolatedinpackages/app/script/test.tsAdds a decision record (
docs/decisions/implemented/testing/2026-08-31-hermetic-vite-fixtures-for-playwright-dom-tests.md) and codifies the hermetic-Vite-fixture checklist in thetesting-guideskill so future Playwright DOM fixtures get the mitigations up front.Verification
bun test --timeout 120000 test/components/file-workbench/open-in-browser.dom.test.ts— 3/3 pass (~7s total)bun run decision:check,bun run skill:check, staged lint — passdist/absent (same condition as the Coverage job)