aglinxinyuan opened a new pull request, #7535:
URL: https://github.com/apache/texera/pull/7535
### What changes were proposed in this PR?
`hub-workflow-detail.component.html` reported 0 of 46 lines while its own
`.ts` sat at 98% — the
attribution loss from #7458, not a testing gap. The spec stubs its three
children out through
`TestBed.overrideComponent`, and any override re-JITs the component from its
decorator metadata; the
re-compiled template has no source map back to the `.html`, so the bindings
execute uncounted.
Adds a `describe` block that renders the component with its real children.
That restores
attribution:
| | Before | After |
|---|---|---|
| lines | 0/46 (0.0%) | **45/46 (97.8%)** |
| branches | — | 3/3 |
Three tests: the real editor and mini-map resolving rather than the stub
selectors, and the
`*ngIf="isHub"` back button appearing and not appearing. It keeps its own
`TestBed` so the 32 tests
above retain their mocked `WorkflowActionService` and the ten assertions
they make on it — the real
service is needed here only because the real editor injects
`DynamicSchemaService`, which reads the
graph's operator streams.
### Verification
Both `*ngIf` mutations were applied to the template and reverted (production
diff empty):
| Mutation | Result |
|---|---|
| back button always rendered (`*ngIf="true"`) | red |
| back button never rendered (`*ngIf="false"`) | red |
Two assertions in the first test are honestly **guards, not behaviour
pins**: renaming the child
elements only breaks the template build rather than producing a clean
behavioural failure, so they
are there to stop the override creeping back in, and the coverage
measurement above is their real
evidence. Saying so rather than listing them as killed mutations.
One assertion was dropped during review of my own work: the clone button's
`[disabled]="!isLogin || !isHub || !isActivatedUser"` does not reflect to
the DOM `disabled`
property under this fixture (it stays `false` with `isHub === false`), so
asserting on it would have
been either vacuous or wrong. The back button discriminates cleanly and is
what the tests use.
No production file is touched.
### Any related issues, documentation, discussions?
Closes #7534
### How was this PR tested?
```
npx ng test --watch=false
--include="**/hub-workflow-detail.component.spec.ts"
```
```
Test Files 1 passed (1)
Tests 35 passed (35)
```
3 new on top of the existing 32. `yarn format:ci` passes.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 5)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]