Skip to content

Add spec coverage for hub.component.ts #5224

@Ma77Ball

Description

@Ma77Ball

Task Summary

Create hub.component.spec.ts for frontend/src/app/hub/component/hub.component.ts.

The component is a thin sidebar/menu shell — it exposes @input() isLogin, @input() sidebarTabs: SidebarTabs, and the routing constants DASHBOARD_HOME, DASHBOARD_HUB_WORKFLOW_RESULT, DASHBOARD_HUB_DATASET_RESULT. It injects GuiConfigService as config.

Behavior to cover:

  • Component created with default isLogin = false and empty sidebarTabs.
  • RouterLink directives bind to the correct constants for each menu item.
  • Menu items render conditionally based on isLogin and sidebarTabs flags (verify NgIf branches for each tab the template gates on).
  • config (GuiConfigService) is exposed as protected, and the template uses it for gating — verify gated items render/hide correctly per config.

Task Type

  • Refactor / Cleanup
  • DevOps / Deployment / CI
  • Testing / QA
  • Documentation
  • Performance
  • Other

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions