Skip to content

test: cover hub.component sidebar gating and routerLinks#5231

Closed
Ma77Ball wants to merge 7 commits into
apache:mainfrom
Ma77Ball:test/HubComponentTest
Closed

test: cover hub.component sidebar gating and routerLinks#5231
Ma77Ball wants to merge 7 commits into
apache:mainfrom
Ma77Ball:test/HubComponentTest

Conversation

@Ma77Ball
Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

  • Replace the hub.component.spec.ts smoke test with nine tests covering default-input render, GuiConfigService injection, per-flag sidebarTabs.*_enabled gating, all-enabled rendering, exclusion of disabled tabs, routerLink bindings to the three routing constants, and isLogin input passthrough.
  • Wrap HubComponent in a test host <ul nz-menu> so nz-menu-item directives resolve their DI tokens the same way they do under the dashboard at runtime.
  • Read routerLink via the directive's routerLinkInput signal since the routerLink input is a write-only setter and ng-reflect-router-link is not populated in the Vitest environment.

Any related issues, documentation, or discussions?

Closes: #5224

How was this PR tested?

  • yarn test --include='src/app/hub/component/hub.component.spec.ts': 9 passed, 0 failed.
  • yarn format:fix: 506 files unchanged.

Was this PR authored or co-authored using generative AI tooling?

Co-authored with Claude Opus 4.7 in compliance with ASF

@Ma77Ball Ma77Ball closed this May 26, 2026
@github-actions github-actions Bot added engine frontend Changes related to the frontend GUI ci changes related to CI docs Changes related to documentations labels May 26, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.55%. Comparing base (24f7702) to head (c43afaf).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5231      +/-   ##
============================================
- Coverage     48.55%   48.55%   -0.01%     
  Complexity     2372     2372              
============================================
  Files          1042     1042              
  Lines         39971    39971              
  Branches       4252     4252              
============================================
- Hits          19408    19407       -1     
- Misses        19414    19416       +2     
+ Partials       1149     1148       -1     
Flag Coverage Δ *Carryforward flag
access-control-service 39.53% <ø> (ø)
agent-service 33.76% <ø> (ø) Carriedforward from 9079dbe
amber 51.51% <100.00%> (-0.01%) ⬇️
computing-unit-managing-service 0.00% <ø> (ø)
config-service 0.00% <ø> (ø)
file-service 37.99% <ø> (ø)
frontend 40.02% <ø> (ø) Carriedforward from 9079dbe
python 90.51% <ø> (ø) Carriedforward from 9079dbe
workflow-compiling-service 56.81% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci changes related to CI docs Changes related to documentations engine frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add spec coverage for hub.component.ts

2 participants