aglinxinyuan opened a new issue, #6262:
URL: https://github.com/apache/texera/issues/6262
### Task Summary
Add `panel.service.spec.ts` covering `PanelService`, a tiny event bus that
exposes two `Subject<void>` streams (`closePanelStream`, `resetPanelStream`)
with `closePanels()` / `resetPanels()` triggers.
## Background
`frontend/src/app/workspace/service/panel/panel.service.ts` is a
dependency-free service (instantiable directly via `new PanelService()`), so no
`TestBed` wiring is required.
```ts
get resetPanelStream() { return this.resetPanelSubject.asObservable(); }
resetPanels() { this.resetPanelSubject.next(); }
get closePanelStream() { return this.closePanelSubject.asObservable(); }
closePanels() { this.closePanelSubject.next(); }
```
## Behavior to pin
| Scenario | Contract |
| --- | --- |
| subscribe `resetPanelStream`, call `resetPanels()` | subscriber fires
exactly once |
| subscribe `closePanelStream`, call `closePanels()` | subscriber fires
exactly once |
| stream independence | calling `resetPanels()` does not emit on
`closePanelStream`, and vice-versa |
Subscribe to the stream, invoke the trigger, and assert the emission count
(e.g. increment a counter in the subscription). Follow
`size-formatter.util.spec.ts` for the plain `describe`/`it`/`expect` style (`ng
test`).
## Scope
- New spec: `frontend/src/app/workspace/service/panel/panel.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]