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 workflow detail template's coverage by rendering its real children #7534
hub-workflow-detail.component.html reports 0 of 46 lines covered while its own .component.ts
sits at 98% with 32 passing tests. That is not an undertested template — it is the attribution loss
recorded in #7458, and this is the file to prove the
mechanism on.
The existing spec stubs the three child components out with TestBed.overrideComponent(..., { remove: { imports: [...] }, add: { imports: [Stub...] } }). Any
override makes Angular re-JIT the component from its retained decorator metadata; the re-compiled
template function has no source map back to the .html, so every binding still executes and none of
it is attributed.
Measured, on this branch:
Before
After
hub-workflow-detail.component.html
0/46 (0.0%)
45/46 (97.8%), branches 3/3
hub-workflow-detail.component.ts
97/99 (98.0%)
97/99 (98.0%)
The remedy is to render the component with its real children in a block that keeps its own TestBed, so the 32 existing tests keep their mocked WorkflowActionService and the ten assertions
they make on it. Wholesale de-stubbing would mean rewriting those ten assertions, which is a bad
trade.
What the real children need, all of it already available in the repo:
workflowEditorTestImports and workflowEditorTestProviders from workspace/component/workflow-editor/workflow-editor.test-utils.ts — the latter supplies the real WorkflowActionService, which the real editor requires because DynamicSchemaService reads getTexeraGraph().getOperatorAddStream(); a mocked service fails at construction.
DragDropModule and PanelService for the real mini-map.
A MarkdownService stub for the real markdown child's <markdown> element.
HubService and WorkflowPersistService stubs matching the shapes the existing mocks use
(getCounts / postView / isLiked / postLike / postUnlike / cloneWorkflow).
Activity
test(frontend): render the hub workflow detail with its real children (…