anishshiva7 opened a new issue, #9662:
URL: https://github.com/apache/texera/issues/9662
### Task Summary
Add `workflow-to-python.service.spec.ts` for `WorkflowToPythonService`. It
has no spec. Its only caller, the workspace menu, mocks it in
`menu.component.spec.ts`, so the request it sends is not pinned anywhere.
## Behavior to pin
| Scenario | Contract |
| --- | --- |
| `convertToPython(plan)` | one `POST {api}/workflow-to-python` with
`Content-Type: application/json` |
| request body | the plan's `operators` and `links`, with `opsToReuseResult:
[]` and `opsToViewResult: []`; no other fields of the plan are sent |
| empty plan | still posts, with empty `operators` / `links` |
| success response | `type`, `pythonCode`, `helpersModule`, `renamedSources`
reach the subscriber as returned |
| failure response | a `{ type: "failure", errorMessage }` body is passed
through, not thrown |
| HTTP error | reaches the subscriber's error callback |
## Scope
- New spec:
`frontend/src/app/dashboard/service/user/workflow-to-python/workflow-to-python.service.spec.ts`.
- No production-code changes.
### Task Type
- [ ] Refactor / Cleanup
- [ ] DevOps / Deployment / CI
- [x] Testing / QA
- [ ] Documentation
- [ ] Performance
- [ ] Other
--
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]