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

   ### Task Summary
   
   
`frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.html`
 reports **92.0% of lines (27 missed), 72.9% of branches and only 42.9% of 
functions (15/35)** behind a 129-test spec.
   
   Worth stating up front, because the obvious guess is wrong: **this is not 
issue #7458.** The spec uses no `TestBed.overrideComponent`, so nothing is 
being re-JIT'd and no attribution is lost. The gaps are real — behaviour never 
driven through the DOM. They fall into four groups: handlers wired to 
child-component outputs, controls that live inside CDK overlays (the row 
dropdown, the popconfirm), the whole version-creator block, and the false legs 
of the header and settings ternaries.
   
   The function figure is the tell. 20 uncovered functions against only 27 
uncovered lines means most of the template's *handlers* are never invoked, even 
though the elements carrying them render.
   
   Traps worth knowing before writing anything here, all of which produce a 
green test that pins nothing:
   
   1. **Degenerate fixtures make formatter bugs invisible.** `formatTime` 
returns `"1s"` for `undefined`, for `0`, and for anything `<= 0` 
(`format.util.ts:34`). A row whose `totalTime` and `estimatedTimeRemaining` are 
both `undefined` renders `["1s", "1s left"]` — so *swapping the two bindings*, 
a genuine user-visible bug, is undetectable. Same trap for `formatSpeed`: 
`1024` and `40` both render `"0.0 MB/s"`. Use distinguishable values.
   2. **`toContain` on a formatted number.** `expect(text).toContain("2")` with 
a size of `2048` also passes on the raw number, so the formatter is unpinned. 
Assert `"2.00 KB"` exactly.
   3. **`expect.any(Number)` / `expect.anything()` in a call assertion** leaves 
argument order free — two numeric arguments can be swapped and the assertion 
holds.
   4. **A one-way copy is not an exchange.** Mutating row A to use row B's 
interpolation is often already killed; the mutation that survives is the *true 
exchange*, each row keeping its label and taking the other's value. Several 
branch pairs here are 2/2 covered and still unpinned for exactly this reason.
   5. **`[disabled]` on an `input[nz-input]` with `[(ngModel)]` does not apply 
synchronously.** `NgModel` routes it through `control.disable()`, deferred to a 
microtask, so the DOM lags one turn behind `detectChanges()`. Asserting 
immediately reads the stale value and invites the false conclusion that the 
binding is inert.
   
   ### 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