The GitHub Actions job "Required Checks" on texera.git/main has failed.
Run started by GitHub user github-merge-queue[bot] (triggered by 
github-merge-queue[bot]).

Head commit for run:
7ba7b9865f741c652ec9af9eae80645387a377fd / Xinyuan Lin <[email protected]>
test(frontend): cover the share-access, card-item and list-item components 
(#8133)

### What changes were proposed in this PR?

Five existing dashboard/workspace specs extended, 202 tests to 236.

| File | Codecov lines | Branch arms |
|---|---|---|
| `share-access.component.ts` | 159/169 → **169/169** | 88/98 →
**98/98** |
| `share-access.component.html` | 66/73 → **73/73** | 10/10 |
| `user-model.component.ts` | 79/82 → **82/82** | 38/42 → 40/42 |
| `user-model.component.html` | 30/34 → **34/34** | 6/6 |
| `user-workflow-list-item.component.ts` | 36/41 → **41/41** | 22/24 →
**24/24** |
| `user-workflow-list-item.component.html` | 68/71 → **71/71** | 4/4 |
| `card-item.component.ts` | 181/190 → 188/190 | 95/102 → 100/102 |
| `card-item.component.html` | 103/106 → 105/106 | 10/14 → 12/14 |
| `workspace.component.ts` | 129/133 → 130/133 | 35/42 → 36/42 |

**+42 fully-covered lines and +22 branch arms** (851/913 → 893/913). Six
files reach 100%. The plain line-hit metric moves +21 — half the Codecov
gain — because many of these lines were already executed and flip only
by completing a branch arm; the two numbers are not interchangeable and
both are given.

### The headline target contributes nothing, and that is the main
finding

`workspace.component.html` shows **0 of 14 lines** on Codecov and was
the reason this bundle was picked. It stays at 0/14.

`workspace.component.spec.ts:164` calls
`TestBed.overrideComponent(WorkspaceComponent, { set: { imports: [],
providers: [], schemas: [CUSTOM_ELEMENTS_SCHEMA] } })`. That forces a
JIT recompile, so the istanbul-instrumented AOT template function is
never executed — measured, not inferred: the spec runs 24 tests green
and every one of the 15 statements in the template reads `hits=0`, along
with the `@ViewChild` view-query and the `beforeunload` host-binding
handler at `FNDA:0`.

Unblocking it means providing each child's transitive dependencies. The
eight child components declare **62 constructor dependencies** between
them (workflow-editor 19, menu 22, result-panel 9), before their
`providedIn: 'root'` services — JointJS paper init, Monaco, the
websocket services. Overriding each *child* instead would keep the
parent template instrumented but still construct each child class and
run its `ngAfterViewInit` against DOM an emptied template does not have.
`vitest.config.ts` already documents this suite OOM-ing workers at 2 GB
(#7975). Refused as an accepted limitation rather than attempted.

### A trap that would have wasted the work

Angular's generated listener source-spans **chain from the end of the
previous listener attribute**, so a zero-hit line in an `.html` file is
frequently not the handler written on that line.

`card-item.component.html:105` reads as
`(keydown.enter)="confirmUpdateCustomName(entry.name)"`, and an existing
passing test already dispatches exactly that key event — yet the line
showed zero. The `statementMap` explains it: the `keydown.enter`
function is declared at `104:56` and is already covered; line 105's zero
statement is the `(click)="$event.stopPropagation()"` handler. Every
`.html` line in this PR was planned from `--coverage-reporters=json` and
the `statementMap`/`fnMap`, never from the template source.

### Verification

**50 semantic mutants, all 50 killed.** Each applied one at a time, with
a sha256 snapshot check, an empty-production-diff check and a "no
non-spec file modified" check before every compile, reverted from the
scratch snapshot and re-verified after. The builder's 31-mutant table
was re-derived from scratch rather than carried over, with every kill
credit re-read from the run log.

Two reviewers returned ten findings; all repaired. **The repair pass
moved coverage by exactly zero** — its three new tests and ~15 new
assertions exercise lines the bundle already reached. What changed is
that those lines are now *pinned* rather than merely executed, and that
is stated rather than sold as extra coverage.

One further trap confirmed and worth carrying: the `DA` line set for a
file depends on which specs are in the run, so the before and after
measurements must use an identical `--include` filter. Both runs here
used the same five spec files.

`card-item.component.ts:310` sits inside a `setTimeout` arrow body —
istanbul instruments arrow bodies, so unlike the Scala modules'
`$anonfun` rule it does count, but the test must not call
`detectChanges` after `onEditDescription()` or the `@ViewChild` resolves
and the false arm is lost. It uses `fakeAsync` + `tick(0)`.

`yarn format:ci` passes. `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 #8131

### How was this PR tested?

```
npx ng test --watch=false --include="**/share-access.component.spec.ts" 
--include="**/card-item.component.spec.ts" 
--include="**/user-model.component.spec.ts" 
--include="**/user-workflow-list-item.component.spec.ts" 
--include="**/workspace.component.spec.ts"
```

```
 Test Files  5 passed (5)
```

Re-run after rebasing onto current `main`.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 5)

Report URL: https://github.com/apache/texera/actions/runs/33432547143

With regards,
GitHub Actions via GitBox

Reply via email to