mengw15 opened a new pull request, #6556:
URL: https://github.com/apache/texera/pull/6556
### What changes were proposed in this PR?
Extends the existing `ResultPanelComponent` spec (codecov ~57.5%) with 16
tests
covering the previously-untested public methods. Existing services are the
real ones from the spec's `TestBed`; specific methods are `vi.spyOn`-stubbed:
- **visibility** — `openPanel` (default dims + notifies resize service),
`closePanel` (collapses), `isPanelDocked` (docked vs. undocked),
`clearResultPanel`.
- **content frames** — `displayConsole`, `displayError`, and `displayResult`
across all three branches (paginated → table frame, non-paginated result →
visualization frame, no result → nothing).
- **position & resize** — `resetPanelPosition`, `updateReturnPosition`
(delta +
undefined no-op), and `onResize` (the `requestAnimationFrame` callback is
run
synchronously via a locally-restored spy so the assertion is
deterministic).
- **drag** — `handleStartDrag` (hides the viz overlay) and `handleEndDrag`
(records the free-drag position).
- **rerenderResultPanel** — no-ops while previewing a workflow version.
All tests are deterministic (no real timers/network/random; the one rAF is
mocked synchronously and restored locally). No production code was changed.
### Any related issues, documentation, discussions?
Closes #6549
### 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/component/result-panel/result-panel.component.spec.ts
# Tests 20 passed (20) (4 existing + 16 new)
eslint <spec> # clean
prettier --check # clean
```
(The component reads `localStorage` on init; on Node 26 that needs
`NODE_OPTIONS=--localstorage-file=...` locally — CI on Node 24.10.0 provides
it.)
### 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]