fix(apollo-react): show node label fallback tooltips#822
fix(apollo-react): show node label fallback tooltips#822KodudulaAshishUiPath wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Dependency License Review
License distribution
Excluded packages
|
e0940f5 to
6f3ebad
Compare
📊 Coverage + size by packagePer-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.
"Coverage" is each package's own |
| import { render, screen, type UserEvent, userEvent } from '../../utils/testing'; | ||
| import { NodeLabel, type NodeLabelProps } from './NodeLabel'; | ||
|
|
||
| vi.mock('../CanvasTooltip', async () => { |
There was a problem hiding this comment.
[medium] The tooltip coverage stops at the mock boundary. These NodeLabel tests replace CanvasTooltip with a test double, so they prove the mock clones trigger props but do not exercise the real integration this PR relies on: CanvasTooltip ref composition, TooltipTrigger asChild, and smart truncation checking the actual label element. That leaves the fallback tooltip behavior unprotected.
There was a problem hiding this comment.
Suggested change:
Add one integration-style test that uses the real CanvasTooltip path, or a focused CanvasTooltip + NodeLabel harness, and verifies a line-clamped NodeLabel opens only when the actual label element is truncated. Keep this mock for unit-level content assertions if it is still useful.

Summary
labelTooltipoverride is provided.Demo
Screen.Recording.2026-06-15.at.16.26.03.mov
Validation
pnpm --filter @uipath/apollo-react exec vitest --run src/canvas/components/BaseNode/NodeLabel.test.tsx src/material/components/ap-tooltip/ApTooltip.test.tsxpnpm exec biome check src/canvas/components/BaseNode/NodeLabel.tsx src/canvas/components/BaseNode/NodeLabel.test.tsx src/canvas/components/BaseNode/BaseNode.stories.tsx src/material/components/ap-tooltip/useTruncationDetection.ts src/material/components/ap-tooltip/ApTooltip.test.tsx