Skip to content

add unit test coverage for UserWorkflowListItemComponent and BrowseSectionComponent #6590

Description

@mengw15

Task Summary

Two components whose specs assert little past creation. Extend each. Vitest/jsdom; see frontend/TESTING.md (standalone → imports:; commonTestProviders; reuse Stub…Service doubles; call fixture.detectChanges() at least once).

Behavior to add

UserWorkflowListItemComponent (frontend/src/app/dashboard/component/user/user-workflow/user-workflow-list-item/user-workflow-list-item.component.ts, codecov ~62%)

  • isLightColor — pure luminance check (returns whether a hex/label color is light). getProjectIds — maps the entry to its project ids. confirmUpdateWorkflowCustomName / confirmUpdateWorkflowCustomDescription — call WorkflowPersistService with the edited value. onClickDownloadWorkfllow — delegates to DownloadService. removeWorkflowFromProject — calls UserProjectService. onClickGetWorkflowExecutions — emits/navigates. Use service doubles.

BrowseSectionComponent (frontend/src/app/hub/component/browse-section/browse-section.component.ts, codecov ~72%)

  • initializeEntry — sets up the entry from @Input. loadCoverImages / getCoverImage — build the ${apiEndpoint}/dataset/{id}/cover URL via a DatasetService double and return/cache the cover image string. Assert with a mocked DatasetService.

Task Type

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions