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
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; seefrontend/TESTING.md.Behavior to add
Extend
left-panel.component.spec.tsso 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*ngForover the panel items,*ngIfbranches and tooltips.Approach:
*ngForexpands over several frames, thenfixture.detectChanges().fixture.debugElement.queryAll(By.css("..."))+.triggerEventHandler("click", ...)and assert the active frame changes (rather than callingopenFramedirectly).*ngIfarm renders.Determinism constraint:
ngAfterViewInitqueues asetTimeoutthat measures tab heights viaquerySelectorAllon the rendered collapse panels (component L143). Do not addvi.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