mengw15 opened a new pull request, #7839:
URL: https://github.com/apache/texera/pull/7839
### What changes were proposed in this PR?
Renders the two panels no test ever opened, so their markup executes (9 new
tests):
| Template | Before | After |
| --- | --- | --- |
| `filters-instructions.component.html` | 3/20 lines | **20/20** |
| `agent-chat.component.html` | 183/192 lines, 16/35 branches | **192/192,
35/35** |
- **FiltersInstructionsComponent** — the entire help block lives in an
`<ng-template>` that ng-zorro only stamps out once the popover opens,
which is
why the class sat at 100 % while the template sat at 15 %. The spec now
opens
the panel through the `NzPopoverDirective` rather than the hover trigger —
the
hover path runs on mouse-enter/leave delay timers — and asserts both lists
item
by item plus the worked example. The panel renders into the CDK overlay
under
`document.body`, so the assertions query it there and `fixture.destroy()`
in
`afterEach` disposes it again.
- **AgentChatComponent** — every remaining red line was a control inside a
modal
or panel that stayed closed. Added: the five parameter rows (typed into and
saved, so both the `[(ngModel)]` write-back and each `save…()` handler
run),
the operator-type search box, select-all/deselect-all and a per-row
`nz-switch`, the message textarea's `[(ngModel)]`, the `Execute N tools`
plural arm, the details button's `showResponseDetails(...)`, and the
`[(visible)]` / `[(nzVisible)]` write-backs of the two modals.
The operator-type test toggles the single switch before the bulk buttons:
nothing
is allowed at that point, so the assertion does not depend on when `ngModel`
pushes a new checked state back into `nz-switch`. No production code was
changed.
### Any related issues, documentation, discussions?
Closes #7838.
### How was this PR tested?
```
ng test --watch=false \
--include
src/app/dashboard/component/user/filters-instructions/filters-instructions.component.spec.ts
\
--include
src/app/workspace/component/agent/agent-panel/agent-chat/agent-chat.component.spec.ts
```
62 passed; the line/branch numbers above come from the same run with
`--coverage --coverage-reporters=lcovonly`. Repeated 5× for stability, and
the
surrounding folders (`workspace/component/agent/**`,
`dashboard/component/user/**`,
42 spec files / 1193 tests) stay green. `yarn format:ci` clean. Failure path
verified by breaking one assertion in each of the 9 new tests: every one
turned
red with a non-zero exit, then all were restored to green.
### 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]