mengw15 opened a new pull request, #6602:
URL: https://github.com/apache/texera/pull/6602

   ### What changes were proposed in this PR?
   
   Extends the existing Vitest spec for `OperatorMetadataService`
   
(`frontend/src/app/workspace/service/operator-metadata/operator-metadata.service.ts`,
   codecov ~56%). The service fetches operator metadata once over HTTP (cached 
via
   `shareReplay`) and serves lookups from it; the existing spec only lightly
   touched this. Adds 8 tests using `HttpClientTestingModule`, each flushing the
   metadata GET with the `mockOperatorMetaData` fixture. No production code 
changed.
   
   - **`getOperatorMetadata`** — emits the fetched metadata to subscribers.
   - **`getOperatorSchema`** — returns the matching `OperatorSchema` for a known
     type; throws for an unknown type; throws "operator metadata is undefined"
     before the request resolves.
   - **`operatorTypeExists`** — `true` for a fetched type, `false` for an 
unknown
     one and before the request resolves; matches the user-friendly name only 
when
     that filter is enabled; honors case-insensitive matching when requested.
   
   ### Any related issues, documentation, discussions?
   
   Closes #6592
   
   ### How was this PR tested?
   
   Extended unit tests, run locally in `frontend/` (all green; the failure path 
was
   verified by breaking an assertion to confirm the suite goes red):
   
   ```
   ng test --watch=false --include 
src/app/workspace/service/operator-metadata/operator-metadata.service.spec.ts
   # Tests  11 passed (11)   (3 existing + 8 new)
   eslint <spec>       # clean
   prettier --check    # clean
   ```
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 4.8 [1M context])
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to