Skip to content

add unit test coverage for OperatorMetadataService #6592

Description

@mengw15

Task Summary

OperatorMetadataService (frontend/src/app/workspace/service/operator-metadata/operator-metadata.service.ts, codecov ~56%) fetches the operator metadata once over HTTP and serves lookups from it; its spec only lightly touches this. Extend the spec with HttpClientTestingModule. Vitest; see frontend/TESTING.md.

Behavior to add

Flush the metadata GET (${apiEndpoint}/${OPERATOR_METADATA_ENDPOINT}) with a small fixture, then cover:

  • getOperatorMetadata — returns the cached observable emitting the fetched metadata.
  • getOperatorSchema(operatorType) — returns the matching OperatorSchema for a known type; assert the returned schema, and the behavior for an unknown type.
  • operatorTypeExists(operatorType)true for a type present in the fetched metadata, false otherwise (including before the request resolves, if applicable).

Task Type

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions