The GitHub Actions job "Required Checks" on 
texera.git/gh-readonly-queue/main/pr-7629-09fa90337a8fb7e109adebd24ccb0d4b81f46ad9
 has succeeded.
Run started by GitHub user aglinxinyuan (triggered by aglinxinyuan).

Head commit for run:
379208ecffea6a9aeddcfe940ea214260a3cf7a7 / Xinyuan Lin <[email protected]>
test(frontend): render the agent panel with its real children (#7629)

### What changes were proposed in this PR?

`agent-panel.component.html` reported **0 of 49 lines** while its own
`.ts` sat at **133/133 with nothing missed**. That pairing can only be
attribution loss — this template is one of the better-tested in the
frontend. The cause is #7458: the spec stubs its children out with
`TestBed.overrideComponent`, and any override re-JITs the component from
its decorator metadata, leaving the re-compiled template with no source
map back to the `.html`.

Adds a `describe` block that renders the component with its **real**
children:

| | Before | After |
|---|---|---|
| `agent-panel.component.html` | 0/49 | **49/49** |
| `agent-panel.component.ts` | 133/133 | 133/133 |

The block keeps its own `TestBed`, so the 42 existing tests keep their
stubs and assertions untouched. Same remedy as merged PR #7535.
Rendering the real children also incidentally lifts the child templates'
own coverage.

### Verification

18 mutations applied and reverted, production diff empty each time.

**Two of my new tests then turned out to claim more than they could
observe, and both are fixed:**

| Test | Why it could not fail | Fix |
|---|---|---|
| "force-renders every tab body: the registration form and one chat per
agent" | the registration tab **is** the selected tab, so its body
renders whether or not `[nzForceRender]` is set — flipping it to `false`
left the suite green | select an agent tab first, so the registration
body is present only if force-rendered; the tautological
`selectedTabIndex` assertion was dropped |
| "the close button ... deletes that agent without selecting its tab" |
`selectedTabIndex` was already 0 and `activateAgent` already un-called,
so both assertions held with `event.stopPropagation()` deleted | start
on the first agent's tab and assert the click does not activate the
neighbour |

Both exposing mutations — the registration tab losing `nzForceRender`,
and the close handler losing `stopPropagation` — are now red.

That second one is worth spelling out: the mutation *did* turn the suite
red before the fix, but the failure came from a **pre-existing** test
elsewhere in the file, while the new test stayed green. A red suite is
not evidence that the test under discussion pins anything.

### Deliberately not included

Nothing in this PR pins the child components' internals; the assertions
stay on this template's own structure and branches.

No production file is touched.

### Any related issues, documentation, discussions?

Closes #7628

### How was this PR tested?

```
npx ng test --watch=false --include="**/agent-panel.component.spec.ts"
```

```
 Test Files  1 passed (1)
      Tests  51 passed (51)
```

9 new on top of the existing 42. Coverage re-measured by reverting the
spec, running with `--coverage`, and restoring. `yarn format:ci` passes.

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

Generated-by: Claude Code (Opus 5)

Co-authored-by: Meng Wang <[email protected]>

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

With regards,
GitHub Actions via GitBox

Reply via email to