Skip to content

Commit 359f190

Browse files
committed
ci: add test to ensure mouse events don't need a sleep afterwards to work
1 parent e3bc741 commit 359f190

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/integration_browser.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ fn integration_browser_events() {
7070
enigo.move_mouse(20, -20, Rel).unwrap();
7171
enigo.move_mouse(-20, -20, Rel).unwrap();
7272

73+
// Ensure mouse events don't need a sleep afterwards to work
74+
enigo.move_mouse(137, 59, Abs).unwrap();
75+
enigo.key(Key::UpArrow, Click).unwrap();
76+
std::thread::sleep(std::time::Duration::from_secs(1));
77+
let (x, y) = enigo.location().unwrap();
78+
assert_eq!((137, 59), (x, y));
79+
7380
// Stalls on Windows, macOS and Linux with x11rb
7481
// enigo.scroll(1, Vertical).unwrap();
7582
// enigo.scroll(1, Horizontal).unwrap();

0 commit comments

Comments
 (0)