mengw15 opened a new pull request, #7366:
URL: https://github.com/apache/texera/pull/7366
### What changes were proposed in this PR?
Extends `result-panel.component.spec.ts` to render the previously-unexercised
half of `result-panel.component.html`. The class was already ~99% covered
but the
template sat at ~45% — the existing tests drive the class, not the DOM. Adds
7
tests that render each template branch (`detectChanges()` + `By.css(...)` +
`triggerEventHandler`):
- **Docked panel** (`width > 0`) — the content renders; the header close, the
in-panel close, and the reset-position button fire their handlers.
- **Collapsed panel** (`width = 0`) — only the open button renders (the body
is
hidden) and it wires `openPanel()`.
- **Title interpolation** — `operatorTitle` appended after `: ` when set,
and the
bare `Result Panel` when not.
- **Tabs** — the "No results available" tab when `frameComponentConfigs` is
empty,
and one tab per frame (`*ngFor` + `*ngComponentOutlet`) when populated.
- **Resize handles** — rendered while docked.
This takes the template from ~45% to **52/53 lines (98%)**. No production
code
was changed.
### Any related issues, documentation, discussions?
Closes #7364.
### How was this PR tested?
`ng test --watch=false --include
src/app/workspace/component/result-panel/result-panel.component.spec.ts` — the
7 new tests pass; template coverage confirmed at 52/53 lines via the lcov
report. `eslint` and `prettier --check` clean. Failure path verified by
breaking a new assertion (→ that test goes red) and restoring.
Note: two pre-existing `persistence on unload` tests assert
`localStorage.setItem` and fail only under Node 26 locally (the file-backed
`--localstorage-file` shim behaves differently from CI's Node 24.10.0
localStorage); they are unrelated to this change and pass on CI.
### 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]