Task Summary
frontend/src/app/workspace/component/agent/agent-panel/agent-panel.component.html reports 0 of 49 lines covered, while its own .component.ts sits at 133/133 with nothing missed. That pairing cannot come from undertesting — this is one of the better-tested templates in the frontend, with roughly 42 tests behind it. It can only come from attribution loss.
The cause is issue #7458: the spec stubs its child components out with TestBed.overrideComponent, and any override makes Angular re-JIT the component from its retained decorator metadata. The re-compiled template function carries no source map back to the .html, so every binding still executes and none of it is attributed.
The remedy is proven — merged PR #7535 applied it to hub-workflow-detail.component.html (0/46 → 45/46). Append a new describe block that configures its own TestBed with no override, imports the real children, satisfies their DI, and asserts on the rendered DOM. Leave the existing tests and their stubs alone.
Because the existing tests are already strong, the new block should target what they cannot reach through the class: rendered structure, and the branches the template itself decides.
Two traps specific to this component, both of which produce a test that cannot fail:
- The registration tab is the selected tab. Asserting its body renders proves nothing about
[nzForceRender], because a selected tab renders either way. Select an agent tab first, then the registration body is present only if it is force-rendered.
selectedTabIndex starts at 0 and activateAgent starts un-called. A close-button test that asserts both from that starting state holds even with event.stopPropagation() deleted. Start on the agent's own tab so a propagated click would move something.
Task Type
Task Summary
frontend/src/app/workspace/component/agent/agent-panel/agent-panel.component.htmlreports 0 of 49 lines covered, while its own.component.tssits at 133/133 with nothing missed. That pairing cannot come from undertesting — this is one of the better-tested templates in the frontend, with roughly 42 tests behind it. It can only come from attribution loss.The cause is issue #7458: the spec stubs its child components out with
TestBed.overrideComponent, and any override makes Angular re-JIT the component from its retained decorator metadata. The re-compiled template function carries no source map back to the.html, so every binding still executes and none of it is attributed.The remedy is proven — merged PR #7535 applied it to
hub-workflow-detail.component.html(0/46 → 45/46). Append a newdescribeblock that configures its ownTestBedwith no override, imports the real children, satisfies their DI, and asserts on the rendered DOM. Leave the existing tests and their stubs alone.Because the existing tests are already strong, the new block should target what they cannot reach through the class: rendered structure, and the branches the template itself decides.
Two traps specific to this component, both of which produce a test that cannot fail:
[nzForceRender], because a selected tab renders either way. Select an agent tab first, then the registration body is present only if it is force-rendered.selectedTabIndexstarts at 0 andactivateAgentstarts un-called. A close-button test that asserts both from that starting state holds even withevent.stopPropagation()deleted. Start on the agent's own tab so a propagated click would move something.Task Type