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

   ### What changes were proposed in this PR?
   
   Extends the existing Vitest spec for `WorkflowPersistService`
   
(`frontend/src/app/common/service/workflow-persist/workflow-persist.service.ts`,
   codecov ~43%). The existing spec only covered `createWorkflow`; this adds 4
   tests for previously-untested GET methods, using `HttpClientTestingModule` +
   `HttpTestingController` (no backend).
   
   Each new test asserts the request method / URL (built from the service's
   exported URL constants) and the mapped response:
   
   - **`retrieveWorkflow`** — GET `workflow/{wid}`; `parseWorkflowInfo` parses 
the
     string `content` into an object.
   - **`retrieveWorkflowIDs`** — GET `workflow/user-workflow-ids`; emits the id 
array.
   - **`retrieveOwners`** — GET `workflow/user-workflow-owners`; emits the 
owner array.
   - **`searchWorkflows`** — GET `workflow/search?<query>` (URL built via
     `toQueryStrings`); each entry gains a parsed `dashboardWorkflowEntry`.
   
   The three existing tests are unchanged. No production code was changed.
   
   ### Any related issues, documentation, discussions?
   
   Closes #6535
   
   ### How was this PR tested?
   
   Extended unit tests, run locally in `frontend/` (all green; the failure path 
was
   verified by breaking a URL assertion to confirm the suite goes red):
   
   ```
   ng test --watch=false --include 
src/app/common/service/workflow-persist/workflow-persist.service.spec.ts
   # Tests  7 passed (7)   (3 existing + 4 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