test(frontend): cover about-page login visibility branches#4894
Merged
bobbai00 merged 2 commits intoMay 4, 2026
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4894 +/- ##
============================================
- Coverage 42.23% 41.84% -0.39%
+ Complexity 2154 2087 -67
============================================
Files 954 953 -1
Lines 34694 34657 -37
Branches 3629 3626 -3
============================================
- Hits 14653 14503 -150
- Misses 19138 19209 +71
- Partials 903 945 +42
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:
|
Contributor
|
hmm can you make CI happy first? |
b570a65 to
2747882
Compare
Adds 3 tests covering the *ngIf branches that codecov flagged in about.component.html: - hides <texera-local-login> when the user is logged in - shows it when logged out and config.localLogin is true - hides it when logged out but config.localLogin is false Provides RouterTestingModule + a NotificationService spy so the real LocalLoginComponent can render under TestBed (matching the spy-mocked NotificationService pattern used elsewhere in the codebase). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2747882 to
f47b015
Compare
Yicong-Huang
approved these changes
May 4, 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?
Adds 3 unit tests to
about.component.spec.tscovering the*ngIfbranches inabout.component.htmlthat codecov flagged on #4890:<texera-local-login>is hidden when the user is logged in.config.env.localLoginis true.config.env.localLoginis false.Provides
RouterTestingModule.withRoutes([])plus aNotificationServicespy viauseValueso the realLocalLoginComponentrenders under TestBed (matching the spy-mockedNotificationServicepattern indownload.service.spec.tsandworkflow-result-export.service.spec.ts).Any related issues, documentation, discussions?
Sibling of #4890 (the actual
/aboutlayout fix). Split out of #4890 because the release branch still uses the old frontend testing framework, and the layout fix needs to backport cleanly without dragging the new spec along. This PR targetsmainonly — no backport.How was this PR tested?
yarn ng test --watch=false --include=\"src/app/hub/component/about/about.component.spec.ts\"→ 4 passed.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (claude-opus-4-7)