aglinxinyuan opened a new pull request, #7481:
URL: https://github.com/apache/texera/pull/7481
### What changes were proposed in this PR?
`handleLinkBreakpoint()` and the four handlers it installs have never run in
any test. The guard at
`workflow-editor.component.ts:202` needs `linkBreakpointEnabled` **and**
`getHighlightingEnabled()`,
and both default to false under test — `MockGuiConfigService` for the first,
`WorkflowActionService`'s
private field for the second. `gui.conf` ships `link-breakpoint-enabled =
true`, so the block is a
shipped feature with no coverage rather than dead code.
Adds 5 tests in a new `describe` that sets both flags before the first
change-detection cycle
(`ngAfterViewInit` reads them once, when it decides whether to install the
handlers at all) and then
drives the handlers through the paper:
| Test | What it pins |
|---|---|
| tool attached, hidden | a new link gets a breakpoint tool, and it stays
out of sight until wanted |
| breakpoint click highlights | clicking the button highlights that link |
| shift-click unhighlights | a second shift-click removes an
already-selected link |
| shift reaches multi-select | the modifier is carried into multi-select
mode |
| show/hide streams | both streams reach the link view, in that order |
**Verified by mutation**, all reverted (production diff empty):
| Mutation | Result |
|---|---|
| tool never attached | red |
| tool left visible | red |
| shift not carried into multi-select | red |
| re-highlights instead of unhighlighting | red |
| show/hide streams swapped | red |
| breakpoint handlers never installed | red |
Two of these needed the test strengthened before they died:
- **show/hide swapped** initially survived — wiring each handler to the
other's stream still calls
`showTools` and `hideTools` once each. The test now asserts call order.
- **shift not carried into multi-select** is routed through the unhighlight
branch on purpose.
`WorkflowActionService.highlightLinks` sets multi-select itself, so on the
highlight branch the
handler's own `setMultiSelectMode` is unobservable; `unhighlightLinks`
does not touch it.
No production file is touched.
### Any related issues, documentation, discussions?
Closes #7478
### How was this PR tested?
```
npx ng test --watch=false --include="**/workflow-editor.component.spec.ts"
```
```
Test Files 1 passed (1)
Tests 62 passed (62)
```
5 new on top of the existing 57. `yarn format:ci` passes.
### 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]