mengw15 opened a new pull request, #7966:
URL: https://github.com/apache/texera/pull/7966
### What changes were proposed in this PR?
`workflow-execution-history.component.spec.ts` exercised the component's
methods
directly, so the template's own event bindings were never the code under
test. This PR
adds 15 cases that drive them through the rendered markup instead — query
with
`By.css`, fire with `triggerEventHandler`, assert on the resulting state. No
production
code changes.
- the search input's `keyup.enter` and `ngModelChange`
- the instructions popover's search-criteria help (opened through
`NzPopoverDirective`,
read back out of the cdk overlay)
- the card's group bookmark and group-delete confirmation
- the paginator's `nzPageIndexChange` and `nzPageSizeChange`
- the header checkbox (check and uncheck all) and both sort arrows,
ascending and descending
- each row's checkbox, bookmark star, rename pencil (committed by both
focusout and Enter),
runtime-statistics button and delete confirmation
`NoopAnimationsModule` joins the shared TestBed imports so the popover's
overlay can open.
Template statement coverage of `workflow-execution-history.component.html`
goes from
69.66 % to 100 % (26 -> 0 uncovered lines), measured locally.
Three of the reported gaps (the `keyup.enter`, `nzPageIndexChange` and
`focusout`
bindings) turned out to be source-map phantoms: their uncovered statements
sit at column
ranges past the end of those lines, and the real code behind them is the
binding on the
following line. Firing those adjacent bindings closes them.
The determinism rules from #6542 are kept: Plotly is not mocked, the fixture
stays
attached to `document.body`, no `DatePipe` output or layout geometry is
asserted, and the
popover closes again at the end of its test.
### Any related issues, documentation, discussions?
Closes #7960
### How was this PR tested?
`ng test --watch=false --include
src/app/dashboard/component/user/user-workflow/ngbd-modal-workflow-executions/workflow-execution-history.component.spec.ts`
-> 61 passed; run three times with identical results. Five of the new
assertions were
verified to fail (non-zero exit) when deliberately broken. `prettier
--check` and `eslint`
are clean on the touched file.
### 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]