From cc1cf1409c4dbc1c67e79a7c4d789bf33f530935 Mon Sep 17 00:00:00 2001 From: phanirithvij Date: Wed, 25 Mar 2026 01:22:00 +0530 Subject: [PATCH] repath-studio: fix nixos test We need a better way to test gui applications using some tool like `dogtail`. This is not mantainable. a simple machine.send_key("ret") is not working in icewm file save dialog Co-authored-by: Fedi Jamoussi Signed-off-by: phanirithvij --- nixos/tests/repath-studio.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/nixos/tests/repath-studio.nix b/nixos/tests/repath-studio.nix index 15242fdedc88..e6761b94ac58 100644 --- a/nixos/tests/repath-studio.nix +++ b/nixos/tests/repath-studio.nix @@ -25,8 +25,13 @@ repath-studio ]; - # electron application, give more memory + # electron application, give more memory and cpu virtualisation.memorySize = 4096; + virtualisation.cores = 4; + virtualisation.qemu.options = [ + # Force qemu at 1020x768 resolution for the Save button click + "-vga none -device virtio-gpu-pci,xres=1020,yres=768" + ]; }; }; @@ -52,7 +57,9 @@ machine.sleep(2) machine.send_key("ctrl-shift-s") machine.sleep(2) - machine.send_chars("/tmp/saved.rps\n") + machine.send_chars("/tmp/saved.rps") + machine.sleep(2) + machine.succeed("su - alice -c 'DISPLAY=:0 xdotool mousemove --sync 975 745 click 1'") # Save file dialog machine.sleep(2) print(machine.succeed("cat /tmp/saved.rps")) assert "${pkgs.repath-studio.version}" in machine.succeed("cat /tmp/saved.rps")