Task Summary
ContextMenuComponent's template is at ~54% (context-menu.component.html, 33 uncovered lines) while its class file is already at 100% — every handler is unit-tested, but the template's menu items are never clicked, so the (click) bindings that wire them up stay uncovered. Bring the template to full coverage. Vitest/jsdom; see frontend/TESTING.md.
Behavior to add
Extend context-menu.component.spec.ts to exercise the menu through the DOM, then run the coverage report and cover the remaining red lines. The gap is entirely (click) handler bindings — e.g. onCopy(), onCut(), onPaste(), and the operator-menu actions such as operatorMenuService.disableHighlightedOperators().
Approach:
- Render the menu (
fixture.detectChanges()), query each menu item with fixture.debugElement.query(By.css("...")) and fire .triggerEventHandler("click", null).
- Assert the click reaches the expected collaborator — spy the component method or the injected
OperatorMenuService / WorkflowActionService double (vi.fn()), and check it was called.
- Where an item is conditionally shown, set the state that renders it first so the item exists to click.
Since the class is already fully covered, the point here is the wiring: each menu entry invokes the handler it declares. Do not assert on layout/geometry under jsdom.
Task Type
Task Summary
ContextMenuComponent's template is at ~54% (context-menu.component.html, 33 uncovered lines) while its class file is already at 100% — every handler is unit-tested, but the template's menu items are never clicked, so the(click)bindings that wire them up stay uncovered. Bring the template to full coverage. Vitest/jsdom; seefrontend/TESTING.md.Behavior to add
Extend
context-menu.component.spec.tsto exercise the menu through the DOM, then run the coverage report and cover the remaining red lines. The gap is entirely(click)handler bindings — e.g.onCopy(),onCut(),onPaste(), and the operator-menu actions such asoperatorMenuService.disableHighlightedOperators().Approach:
fixture.detectChanges()), query each menu item withfixture.debugElement.query(By.css("..."))and fire.triggerEventHandler("click", null).OperatorMenuService/WorkflowActionServicedouble (vi.fn()), and check it was called.Since the class is already fully covered, the point here is the wiring: each menu entry invokes the handler it declares. Do not assert on layout/geometry under jsdom.
Task Type