From efd1e065c6bac23ff88411dc92f71ec5a59a3531 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 26 Jun 2025 12:34:08 +0200 Subject: [PATCH] nixosTests.lomiri: Fix mouse coords We now apply a patch to lomiri that fixes some mouse issues in regular & VM usage, but causes some of our hardcoded coordinates to no longer work. Update any coords that got broken by this. --- nixos/tests/lomiri.nix | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/nixos/tests/lomiri.nix b/nixos/tests/lomiri.nix index 42d882fd1454..42c93f3070f8 100644 --- a/nixos/tests/lomiri.nix +++ b/nixos/tests/lomiri.nix @@ -139,12 +139,8 @@ let Move the mouse to a screen location and hit left-click. """ - # Need to reset to top-left, --absolute doesn't work? - machine.execute("ydotool mousemove -- -10000 -10000") - machine.sleep(2) - # Move - machine.execute(f"ydotool mousemove -- {xpos} {ypos}") + machine.execute(f"ydotool mousemove --absolute -- {xpos} {ypos}") machine.sleep(2) # Click (C0 - left button: down & up) @@ -157,7 +153,7 @@ let """ # Using the keybind has a chance of instantly closing the menu again? Just click the button - mouse_click(20, 30) + mouse_click(15, 15) ''; @@ -653,7 +649,7 @@ in machine.screenshot("settings_lomiri-content-hub_peers") # Select Morph as content source - mouse_click(370, 100) + mouse_click(340, 80) # Expect Morph to be brought into the foreground, with its Downloads page open wait_for_text("No downloads") @@ -853,8 +849,8 @@ in ocr = [ "Log Out" ]; extraCheck = '' # We should be able to log out and return to the greeter - mouse_click(720, 280) # "Log Out" - mouse_click(400, 240) # confirm logout + mouse_click(600, 280) # "Log Out" + mouse_click(340, 220) # confirm logout machine.wait_until_fails("pgrep -u ${user} -f 'lomiri --mode=full-shell'") ''; })