()
| 172 | |
| 173 | test('tooltip with imperative open options', async () => { |
| 174 | const ImperativeOptionsExample = () => { |
| 175 | const tooltipRef = useRef(null) |
| 176 | |
| 177 | const handleOpenWithOptions = () => { |
| 178 | tooltipRef.current?.open({ |
| 179 | position: { x: 100, y: 100 }, |
| 180 | anchorSelect: '#custom-anchor', |
| 181 | }) |
| 182 | } |
| 183 | |
| 184 | return ( |
| 185 | <> |
| 186 | <button onClick={handleOpenWithOptions}>Open With Options</button> |
| 187 | <span id="custom-anchor">Custom Anchor</span> |
| 188 | <Tooltip |
| 189 | id="imperative-options-test" |
| 190 | content="Imperative Options Test" |
| 191 | ref={tooltipRef} |
| 192 | /> |
| 193 | </> |
| 194 | ) |
| 195 | } |
| 196 | |
| 197 | render(<ImperativeOptionsExample />) |
| 198 |
nothing calls this directly
no outgoing calls
no test coverage detected