Skip to content

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

Open
Ma77Ball wants to merge 1 commit into
apache:mainfrom
Ma77Ball:test/HubComponentSpec
Open

test: cover hub.component sidebar gating and routerLinks#5232
Ma77Ball wants to merge 1 commit into
apache:mainfrom
Ma77Ball:test/HubComponentSpec

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

@github-actions github-actions Bot added the frontend Changes related to the frontend GUI label May 26, 2026
@codecov-commenter
Copy link
Copy Markdown

⚠️ JUnit XML file not found

The CLI was unable to find any JUnit XML files to upload.
For more help, visit our troubleshooting guide.

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

Labels

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