aglinxinyuan opened a new issue, #7660:
URL: https://github.com/apache/texera/issues/7660

   ### Task Summary
   
   
`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.
   
   ### Task Type
   
   - [ ] Refactor / Cleanup
   - [ ] DevOps / Deployment / CI
   - [x] Testing / QA
   - [ ] Documentation
   - [ ] Performance
   - [ ] Other
   


-- 
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]

Reply via email to