test(frontend): re-enable 4 user-workflow / dashboard / list-item specs#4944
Merged
Yicong-Huang merged 2 commits intoapache:mainfrom May 6, 2026
Conversation
Lifts the last 4 spec files in apache#4880's NgModule → standalone TestBed shape. Also fixes a malformed template attribute introduced by the standalone migration that jsdom would not tolerate. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4944 +/- ##
============================================
+ Coverage 42.22% 42.41% +0.19%
Complexity 2180 2180
============================================
Files 980 1005 +25
Lines 36287 37407 +1120
Branches 3783 3914 +131
============================================
+ Hits 15321 15865 +544
- Misses 20038 20578 +540
- Partials 928 964 +36
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
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?
Drop 4 entries from the spec exclusion lists in
tsconfig.spec.jsonandangular.json's test target, port their TestBed setups to the standalone-component shape, and fix one malformed template attribute that jsdom won't tolerate.Specs re-enabled:
dashboard.component.spec.ts— extendssocialAuthServiceMockwithinitState(the Google sign-in directive subscribes to it in its constructor) and adds anAdminSettingsServicestub; switches toimports: [DashboardComponent]so its standalone graph carriesGoogleSigninButtonModuleinstead of relying onNO_ERRORS_SCHEMA.user-project-list-item.component.spec.ts— wraps the component in aTestHostComponenttemplate<nz-list><texera-user-project-list-item .../></nz-list>so the<nz-list-item>-rooted component finds anNzListComponentprovider; addsprovideRouter([])for the embedded[routerLink].user-workflow-list-item.component.spec.ts— same<nz-list>host wrapper.user-workflow.component.spec.ts— switchesdeclarations: [...]toimports: [...]for the now-standalone children; convertsbeforeEach(waitForAsync(...))tobeforeEach(async () => ...)so the setup runs outside the per-itProxyZone wrapper.Drive-by template fix:
user-workflow.component.htmlhad a stray]="true"line — left over from #4873's[nzBorderless]="true"→nzVariant="borderless"rewrite. Browsers silently tolerate the malformed attribute, but jsdom throwsInvalidCharacterError: "]" did not match the Name productionduringsetAttribute, which is why the spec couldn't run under Vitest.After this PR, the exclude list contains only specs gated on Vitest browser mode (#4866) or specs whose body is still a placeholder.
Any related issues, documentation, discussions?
Part of #4880.
How was this PR tested?
yarn install && yarn ng test --watch=falseexits 0 locally;yarn format:ciis clean. CI exercises the same test command on the ubuntu / windows / macos frontend matrices.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.7 (1M context)