mengw15 opened a new issue, #7363:
URL: https://github.com/apache/texera/issues/7363
### Task Summary
`LeftPanelComponent`'s **template** is at ~45% (`left-panel.component.html`,
32 uncovered lines) while its class file is already at **100%**. The panel's
frame tabs are never rendered/clicked in the spec, so their bindings stay
uncovered. Bring the template to full coverage. Vitest/jsdom; see
`frontend/TESTING.md`.
### Behavior to add
Extend `left-panel.component.spec.ts` so the tab list renders and each
branch is exercised, then run the coverage report and cover the remaining red
lines. The uncovered constructs are `(click)` handlers (`openFrame(0)`,
`openFrame(i)`), the `*ngFor` over the panel items, `*ngIf` branches and
tooltips.
Approach:
- Provide a panel-item config so the `*ngFor` expands over several frames,
then `fixture.detectChanges()`.
- Click the rendered tabs via `fixture.debugElement.queryAll(By.css("..."))`
+ `.triggerEventHandler("click", ...)` and assert the active frame changes
(rather than calling `openFrame` directly).
- Toggle the flags the template switches on (collapsed/expanded,
enabled/disabled frames) so each `*ngIf` arm renders.
Determinism constraint: `ngAfterViewInit` queues a `setTimeout` that
measures tab heights via `querySelectorAll` on the rendered collapse panels
(component L143). **Do not add `vi.useFakeTimers()` to suppress or drive it** —
a synchronous test body never runs the callback, and layering fake timers over
zone.js's patched timers is Node-version dependent and has caused CI-only
failures. Also do not assert the measured heights
(`getBoundingClientRect`/offset sizes are zeros under jsdom) — assert the
rendered tabs and the active-frame state instead.
### 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]