Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/wx_integration/test_wx_hover_tooltip.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ def test_switching_to_different_hoverable_content_does_not_flicker_hide_the_old_
# hover is pending, so the still-shown old popup must not flicker-hide
# while waiting for the new content's own show delay to elapse.
anchor_b = wx.Rect(anchor_a.x, anchor_a.y - 20, 10, 10)
wx_harness.move_mouse_to(anchor_b.GetPosition(), delay_ms=0)
wx_harness.move_mouse_direct(anchor_b.GetPosition())
tooltip.notify_hover("content-b", anchor_b)
wx_harness.wait_ms(_SHOW_DELAY_MS // 2)

# Check that the tooltip is still showing the old content
popup = tooltip._popup
Expand Down
6 changes: 6 additions & 0 deletions tests/wx_integration/wx_test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ def move_mouse_to(self, point: wx.Point, delay_ms: int = 150) -> None:
sim = self.ui_simulator
self._run_steps([lambda: sim.MouseMove(point.x, point.y)], delay_ms)

def move_mouse_direct(self, point: wx.Point) -> None:
"""Move the simulated mouse cursor to an absolute screen point
immediately, without any delay or intermediate steps.
"""
self.ui_simulator.MouseMove(point.x, point.y)

def move_mouse_linear(
self,
point: wx.Point,
Expand Down