You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Recover the hub search result template's coverage by rendering its real children #7660
frontend/src/app/hub/component/hub-search-result/hub-search-result.component.html reports 0 of 23 lines, 0 of 8 branches and 0 of 3 functions covered — behind a 17-test spec. That pairing is the signature of attribution loss, not of an untested template.
The cause is issue #7458: the spec swaps its four children for same-selector stubs via TestBed.overrideComponent, and any override makes Angular re-JIT the component from its retained decorator metadata. The recompiled template carries no source map back to the .html, so every binding still executes and none of it is attributed.
The remedy is proven — merged PRs #7535, #7627 and #7629 applied it to hub-workflow-detail (0/46 → 45/46), search (0/35 → 35/35) and agent-panel (0/49 → 49/49). Append a new describe block that calls TestBed.resetTestingModule(), configures its own TestBed with no override, imports the real children, satisfies their DI, renders, and asserts on the rendered DOM. Leave the existing tests and their stubs alone.
One trap here is worth writing down, because it produces an assertion that looks strong and is half blind:
Reading nz-button's type as a boolean pins only one leg of a ternary.[nzType]="viewMode === 'list' ? 'primary' : 'default'" read back as classList.contains("ant-btn-primary") cannot tell 'default' from 'dashed' or 'link' — both ship green. Read the type by name instead. When doing so, match against the nzType names rather than any ant-btn-* class, because the buttons also carry modifier classes such as ant-btn-icon-only.
This is the last of the six templates #7458 identified; user-project and workspace are the remaining two, and user-project is being deleted by the project-feature removal.
Activity
test(frontend): render the hub search result with its real children (a…