aglinxinyuan opened a new pull request, #7627:
URL: https://github.com/apache/texera/pull/7627
### What changes were proposed in this PR?
`search.component.html` reported **0 of 35 lines** covered while its own
`.ts` sat at 93%. That is the attribution loss from #7458, not an untested
template: the spec stubs its children out through `TestBed.overrideComponent`,
and any override re-JITs the component from its decorator metadata, so the
re-compiled template has no source map back to the `.html` and its bindings
execute uncounted.
Adds a `describe` block that renders the component with its **real**
children, which restores attribution:
| | Before | After |
|---|---|---|
| `search.component.html` lines | 0/35 | **35/35** |
| `search.component.html` functions | 0/6 | **6/6** |
| `search.component.ts` lines | 52/56 | 55/56 |
| `search.component.ts` branches | 19/23 | 21/23 |
The block keeps its own `TestBed`, so the 15 existing tests keep their stubs
and assertions untouched. Same remedy as merged PR #7535.
### Verification
16 mutations applied and reverted, production diff empty each time. Five
were then run independently, chosen against the failure modes rather than
repeating the list:
| Probe | Result |
|---|---|
| drop `[currentUid]` from the child binding | red — so the child-instance
assertion is not the "collaborator also sets it" trap |
| `(sortMethodChange)` no longer assigns | red |
| the All-type button unwired | red |
| delete the Project button's `nz-icon` span | red — which also proves
`nz-icon` really derives its `anticon-*` class under jsdom |
| `[showResourceTypes]="true"` → `"false"` | **survives**, and was reported
as such |
I ran a sixth of my own afterwards — unwiring the All-type button — and it
is red.
### Deliberately not included
`[showResourceTypes]` is reported rather than pinned: repo-wide grep shows
the consuming component never varies it, so the flag has one value in practice
and no assertion can distinguish the two.
No production file is touched.
### Any related issues, documentation, discussions?
Closes #7626
### How was this PR tested?
```
npx ng test --watch=false --include="**/search.component.spec.ts"
```
```
Test Files 1 passed (1)
Tests 22 passed (22)
```
7 new on top of the existing 15. Coverage re-measured from scratch by
reverting the spec, running with `--coverage`, then restoring. `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]