You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@texera.apache.org by GitBox <gi...@apache.org> on 2026/08/06 16:22:18 UTC
[GH] (texera/gh-readonly-queue/main/pr-7335-5a933c1fe2c67d38058eed9d9374eb1b1b0a7468): Workflow run "Lint PR" failed!
The GitHub Actions job "Lint PR" on texera.git/gh-readonly-queue/main/pr-7335-5a933c1fe2c67d38058eed9d9374eb1b1b0a7468 has failed.
Run started by GitHub user mengw15 (triggered by mengw15).
Head commit for run:
0eb9a9953f632bb2e67bebe05d47faa7b04d0b1d / Meng Wang <me...@uci.edu>
test(frontend): cover ContextMenuComponent template menu-item click bindings (#7335)
### What changes were proposed in this PR?
Extends `ContextMenuComponent`'s spec to cover the template's menu-item
`(click)`
bindings. The class file is already at 100%, but the existing tests call
the
handlers directly and never render/click the menu, so the template sat
at ~54%.
13 added tests render the menu (setting the state each item's `*ngIf`
needs),
query the `<li nz-menu-item>` by its label via `By.css`, fire
`.triggerEventHandler("click", null)`, and assert the click reaches the
handler
the item declares — either the component method (`onCopy` / `onCut` /
`onPaste` /
`onDelete` / `onClickExportHighlightedExecutionResult`, spied) or the
injected
`OperatorMenuService` double (`disableHighlightedOperators`,
`viewResultHighlightedOperators`, `reuseResultHighlightedOperator`,
`executeUpToOperator`). Covers both variants of the toggle items
(disable/enable,
view/remove-view, reuse/remove-reusing) and both delete paths (operators
vs
links-only).
This lifts `context-menu.component.html` from ~54% to **97.92%**. The
single
remaining line is the hardcoded-`nzDisabled` "reuse result" item's
`(click)`:
a disabled `nz-menu-item` genuinely swallows the click (verified —
clicking it
does not invoke the handler), so rather than force an unrealistic
interaction the
test only asserts that item renders; its handler is identical to
"remove reusing result", which is clicked and covered.
No production code was changed.
### Any related issues, documentation, discussions?
Closes #7332
### How was this PR tested?
Extended unit tests, run locally in `frontend/`:
```
ng test --watch=false --include src/app/workspace/component/workflow-editor/context-menu/context-menu/context-menu.component.spec.ts
# Test Files 1 passed (1) | Tests 42 passed (42) — 3 consecutive runs, 0 flakes
# context-menu.component.html: ~54% -> 97.92%
prettier --write <spec> # formatted
eslint <spec> # clean
```
The failure path was verified by deliberately breaking a new assertion
and
confirming the suite exits non-zero.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.8 [1M context])
Report URL: https://github.com/apache/texera/actions/runs/31117456617
With regards,
GitHub Actions via GitBox