aglinxinyuan opened a new issue, #7950:
URL: https://github.com/apache/texera/issues/7950
### Task Summary
`findIntersectedLink`'s entire loop body (lines 442–460) has never executed.
Every existing call site either has no links on the canvas, no attached joint
paper, or mocks the method out — the one test that exercises the
intersected-link branch of `dragDropped` stubs `findIntersectedLink` to return
a fixed link.
The loop is what decides whether dropping an operator onto an edge splices
it into that edge, so a wrong answer either rewires a graph the user never
pointed at or silently fails to splice. Alongside the intersection decision it
holds three defensive `continue`s — a link the paper has no model for, no view
for, or whose view has no drawn `.connection` path yet — each of which must
yield "no edge" rather than throw and abort the whole drop.
It is reachable: jointjs renders link views synchronously, and the spec
already establishes the pattern of attaching a real paper to a detached host
element (`attachMainJointPaper({ el: paperHost })`).
One thing to know: jsdom implements no SVG path geometry, so
`getTotalLength` / `getPointAtLength` must be installed on the rendered
`.connection` path. The existing `doesOperatorIntersectPath` tests already
hand-build a path the same way, so this is consistent rather than novel — and
everything the loop itself does stays real.
### 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]