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

   ### Task Summary
   
   Two frontend files with different problems, bundled because the fix for one 
is already proven and the other is a plain gap:
   
   | File | Codecov | Real state |
   |---|---|---|
   | `workspace/service/compile-workflow/workflow-compiling.service.ts` | 
86.9%, 11 missed + 10 partial of 160 | genuinely untested paths |
   | `dashboard/component/user/search-results/search-results.component.html` | 
75.8%, 8 missed of 33 | **0/33 locally — attribution loss** |
   
   **The template is another instance of #7458, and this one is worth 
documenting because it looks like the opposite.** The existing `describe` uses 
`TestBed.overrideComponent`, and it *does* render and assert on the DOM — it 
checks `texera-list-item` counts, `.card-entry` nodes, and load-more 
visibility. Yet the template measures **0 of 33 lines, 0 of 6 branches, 0 of 6 
functions**. Rendering happens; nothing is attributed. A second fingerprint: 
under the override the whole template function is attributed to the `.ts` file 
as one uncovered span.
   
   The remedy is the one merged in #7535, #7627, #7629, #7661 and #7681 — 
append a `describe` with its own `TestBed`, no override, real children, 
DOM-only assertions, leaving the existing tests and their stubs untouched.
   
   Traps worth knowing before writing anything here:
   
   1. **A one-sided template read pins half a binding.** 
`[currentUid]="currentUid"` replaced by `entry.ownerId` survives unless two 
entries have *different* owners and the assertion re-points the current user. 
Same shape for any `[x]="y"` where the fixture makes `x` and `y` coincide.
   2. **A TypeScript narrowing error is not a kill.** Exchanging the 
success/failure legs of the compile response fails to compile under 
`strictTemplates`; that proves nothing and must be replaced with a semantic 
mutation. Likewise, dropping a `&&` guard Angular relies on for narrowing needs 
a companion non-null assertion so the mutant still compiles and the *behaviour* 
is what changes.
   3. **Two branches here cannot be covered.** `if (!dynamicSchema) return 
undefined` is dead — `DynamicSchemaService.getDynamicSchema()` returns a 
non-nullable `OperatorSchema` and throws on a miss. And `if (schemas.length > 
0)` sits inside `if (linksToThisPort.length > 0)` where `schemas` is that array 
mapped, so the false leg cannot occur.
   
   ### 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