aglinxinyuan opened a new issue, #7478:
URL: https://github.com/apache/texera/issues/7478

   ### Task Summary
   
   `workflow-editor.component.ts` is the second-largest frontend coverage gap 
(147 missed lines), and
   about a third of it is one contiguous block that no test has ever entered: 
`handleLinkBreakpoint()`
   and the four handlers it installs (`handleLinkBreakpointToolAttachment`,
   `handleLinkBreakpointButtonClick`, `handleLinkBreakpointHighlightEvents`,
   `handleLinkBreakpointToggleEvents`, lines 1311–1417).
   
   The reason is the guard at line 202, which has **two** halves and both 
default to false in a test:
   
   ```ts
   if (this.config.env.linkBreakpointEnabled && 
this.workflowActionService.getHighlightingEnabled()) {
     this.handleLinkBreakpoint();
   }
   ```
   
   - `MockGuiConfigService` sets `linkBreakpointEnabled: false`, while 
`gui.conf` ships
     `link-breakpoint-enabled = true`;
   - `WorkflowActionService.highlightingEnabled` is a private field initialised 
to `false` and turned on
     when a workflow is loaded.
   
   So this is a shipped feature with zero coverage, not dead code. Both flags 
have to be set **before
   the first `detectChanges()`** — `ngAfterViewInit` reads them once, when it 
decides whether to install
   the handlers at all — after which the whole block is reachable in jsdom with 
no extra infrastructure.
   
   Notes for whoever writes this:
   
   - JointJS `LinkView.hideTools()` delegates to `ToolsView.hide()` → 
`focusTool(null)`, which hides the
     individual tools; it does **not** set `display` on the `ToolsView` 
element. Assert on
     `view._toolsView.tools[0].isVisible()`, not on the tools element's style.
   - The breakpoint show/hide subjects are `jointLinkBreakpointShowStream` / 
`jointLinkBreakpointHideStream`
     (the public accessors drop the `joint` prefix).
   - **Trap.** Asserting multi-select state after a plain breakpoint click 
proves nothing:
     `WorkflowActionService.highlightLinks(multiSelect, …)` sets multi-select 
itself
     (`workflow-action.service.ts:502`), so the handler's own 
`setMultiSelectMode` at line 1346 can be
     deleted and the assertion still passes. `unhighlightLinks` does not touch 
it, so the shift-click
     unhighlight branch is where the handler is the only writer.
   
   ### Task Type
   
   - [ ] Refactor / Cleanup
   - [ ] DevOps / Deployment / CI
   - [x] Testing / QA
   - [ ] Documentation
   - [ ] Performance
   - [ ] Other
   


-- 
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]

Reply via email to