test(frontend): unblock 7 specs from jsdom#4950
Merged
Yicong-Huang merged 2 commits intoapache:mainfrom May 6, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4950 +/- ##
============================================
+ Coverage 42.49% 42.58% +0.09%
Complexity 2177 2177
============================================
Files 1005 1031 +26
Lines 37422 38096 +674
Branches 3911 3997 +86
============================================
+ Hits 15901 16223 +322
- Misses 20558 20861 +303
- Partials 963 1012 +49
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
aglinxinyuan
approved these changes
May 5, 2026
…ntjs paper Most of the specs previously parked under apache#4866 didn't actually need Vitest browser mode — they were tripping over a CSS import in monaco-breakpoints, missing requestIdleCallback in jsdom, and stale NgModule TestBed setups. Address those root causes so the specs can run under jsdom; leave only the genuinely layout-dependent jointjs paper tests for browser mode. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4c6c01b to
8de9fb4
Compare
This was referenced May 6, 2026
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.
What changes were proposed in this PR?
Most specs that #4866 listed as needing Vitest browser mode actually weren't blocked by jsdom's missing layout — they were tripping on infra and migration leftovers. Fix the root causes so they run under jsdom; narrow #4866 to the real layout-dependent jointjs paper suite.
Three changes:
vitest.config.tsinlinesmonaco-breakpointsso itsimport './style.css'goes through Vite instead of Node's ESM loader (which crashes on.css).jsdom-svg-polyfill.tsstubsrequestIdleCallback(Chrome-only).declarations→imports(post-refactor(frontend): convert all components to standalone #4873 standalone) andbeforeEach(waitForAsync)→beforeEach(async)(the ProxyZone wrapper intest-zone-setup.tsonly coversit/test).Plus three small per-spec fixes:
vi.spyOn→.mockImplementation(() => {})incode-debugger(vitest spies call through by default, unlike Jasmine),innerText→textContentinoperator-property-edit-frame(jsdom'sinnerTextis layout-dependent), andit.skipfor the 2 drag-drop tests that genuinely need real geometry.After this, the only spec excluded for jsdom-vs-real-browser reasons is
workflow-editor.component.spec.ts.Any related issues, documentation, discussions?
Part of #4861. Narrows #4866 to the jointjs paper suite + 2 drag-drop geometry tests.
How was this PR tested?
yarn ng test --watch=false: 251 pass, 11 skip, 2 todo.yarn format:ciclean.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.7 (1M context)