aglinxinyuan opened a new pull request, #8290:
URL: https://github.com/apache/texera/pull/8290

   ### What changes were proposed in this PR?
   
   Four existing frontend specs extended. **+63 fully-covered lines and +15 
branch arms** — 916/978 → 979/978 across the five files, four of which reach 
100%.
   
   | File | Codecov fully-covered | Branch arms |
   |---|---|---|
   | `model-detail.component.ts` | 197/228 → **227/228** | 90/100 → **99/100** |
   | `model-detail.component.html` | 203/221 → **221/221** | 26/30 → **30/30** |
   | `admin-settings.component.html` | 204/214 → **214/214** | 34/34 |
   | `heatmap-scoring.ts` | 50/54 → **54/54** | 40/42 → **42/42** |
   | `dataset-detail.component.html` | 262/263 → **263/263** | 32/32 |
   
   `model-detail.component.ts` goes from 31 missed lines to 1. The plain 
line-hit metric moves +50 against Codecov's +63, because thirteen of the gained 
lines were already executed and flip only by completing a branch arm — the two 
numbers are not interchangeable and both are given.
   
   This is newly-landed Models-page code: `model-detail.component.ts` had 
**grown by 13 missed lines** since the previous coverage scan, and 
`heatmap-scoring.ts` is a new file. `model-detail.component.spec.ts` goes 48 → 
67 tests.
   
   ### Angular templates are real, countable coverage
   
   Worth stating because it is easy to assume otherwise: `.html` templates 
appear in `lcov.info` as their **own `SF:` records** — v8 coverage remapped 
through the AOT source map — and each "line" is a generated listener or 
creation block. **28 of the 63 lines here are in templates.** A single-spec run 
shows ten such records.
   
   ### Three DOM-query traps, each hit and solved
   
   - **`model-detail.component.html` has two `<texera-markdown-description>` 
instances** (Model Card and Settings), and `nz-tabs` keeps already-activated 
panes alive. `query(By.directive(MarkdownDescriptionComponent))` therefore 
returns the *non-editable* one and a `descriptionChange` emit goes nowhere. The 
tests select on `.editable` rather than taking the first match. Same class of 
trap for `nz-select` — two on Settings plus one on Versions & Files — so those 
are indexed.
   - **`nz-tooltip` needs an animations module.** Opening one instantiates an 
overlay host carrying `[@zoomBigMotion]`, which throws without it. The new 
`admin-settings` describe has its own TestBed with `NoopAnimationsModule`.
   - **Tooltip content renders into the CDK overlay on `document.body`**, not 
`fixture.nativeElement`, so those assertions read from `document.body`. That 
describe also drains the `assets/` requests `nz-icon` lazily fetches before 
`http.verify()`.
   
   `onSideResize` assigns inside a `requestAnimationFrame` callback, so its 
test awaits a frame rather than using `fakeAsync` — jsdom runs rAF callbacks 
FIFO, so the component's fires first.
   
   ### Verification
   
   **49 mutants, zero survivors** — 36 re-derived from scratch plus 13 more. 
Every kill is credited to the exact test that failed. The only two 
multi-killers are disclosed, and each is second-killed by another *new* test 
rather than by pre-existing collateral.
   
   Three mutants survive and are reported plainly as genuinely equivalent, with 
reasoning, rather than papered over.
   
   Measured with the **full** frontend suite in one command — no name filter 
and no `--include` at all — so there is no filter-attribution risk. `LF` is 
unchanged on all five files, confirming zero production drift. The lcov landed 
at `frontend/coverage/gui/lcov.info`; both metrics were parsed with a script 
applying Codecov's rule directly.
   
   **The repair pass moved coverage by exactly zero** on every one of the five 
files, verified as a separate builder-final → repair-final parse. The builder's 
+63 stands and reproduced number for number, including the one file it did not 
fully close. The repair bought mutation strength only, and that is stated 
rather than sold as coverage.
   
   ### Deliberately not included
   
   `model-detail.component.ts:245` remains partial — an unreachable arm.
   
   `dataset-detail.component.html` contributes 1 line and was nearly dropped: 
its spec has three top-level describes with different helper names and render 
helpers, so appending at the end of the file does not compile.
   
   `yarn format:ci` passes — the inserted blocks initially failed `prettier 
--check`, which is a CI step, so that was fixed rather than left. 
`frontend/junit.xml` is regenerated by every run, is not gitignored, and is not 
committed. No production file is touched.
   
   ### Any related issues, documentation, discussions?
   
   Closes #8289
   
   ### How was this PR tested?
   
   ```
   npx ng test --watch=false --include="**/model-detail.component.spec.ts" 
--include="**/admin-settings.component.spec.ts" 
--include="**/heatmap-scoring.spec.ts" 
--include="**/dataset-detail.component.spec.ts"
   ```
   
   ```
    Test Files  4 passed (4)
   ```
   
   Re-run after rebasing onto current `main`.
   
   ### 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]

Reply via email to