Yicong-Huang opened a new pull request, #5183:
URL: https://github.com/apache/texera/pull/5183
### What changes were proposed in this PR?
Four specs wired the real Angular `HttpClient` rather than the testing
variant — either by importing `HttpClientModule`, providing `HttpClient`
directly, or hand-rolling a `StubHttpClient` that returned `of("a")` for every
`post`. That left the specs one missing mock away from a real network call in
CI and drifted from the convention in `frontend/TESTING.md`.
Each spec is now routed through `HttpClientTestingModule`:
- `operator-reuse-cache-status.service.spec.ts` /
`operator-menu.service.spec.ts` — one-line import swap from
`@angular/common/http` (`HttpClientModule`) to `@angular/common/http/testing`
(`HttpClientTestingModule`).
- `execute-workflow.service.spec.ts` — drops the in-file `StubHttpClient`
and its `Observable` import; the testing module now supplies `HttpClient`.
- `user-computing-unit.component.spec.ts` — moves `HttpClient` out of
`providers` and pulls `HttpClientTestingModule` into `imports`.
### Any related issues, documentation, discussions?
Closes #5182. The rule itself is documented in `frontend/TESTING.md`
(introduced in #5170).
### How was this PR tested?
`yarn ng test --watch=false --include=…` against the four affected specs
locally: 4 files, 20 tests, all pass. `yarn format:ci` clean.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.7
--
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]