at 25.11-pre 973 B view raw
1import ./make-test-python.nix ( 2 { pkgs, ... }: 3 { 4 name = "plotinus"; 5 meta = { 6 maintainers = pkgs.plotinus.meta.maintainers; 7 timeout = 600; 8 }; 9 10 nodes.machine = 11 { pkgs, ... }: 12 13 { 14 imports = [ ./common/x11.nix ]; 15 programs.plotinus.enable = true; 16 environment.systemPackages = [ 17 pkgs.gnome-pomodoro 18 pkgs.xdotool 19 ]; 20 }; 21 22 testScript = '' 23 machine.wait_for_x() 24 machine.succeed("gnome-pomodoro >&2 &") 25 machine.wait_for_window("Pomodoro", timeout=120) 26 machine.succeed( 27 "xdotool search --sync --onlyvisible --class gnome-pomodoro " 28 + "windowfocus --sync key --clearmodifiers --delay 1 'ctrl+shift+p'" 29 ) 30 machine.sleep(5) # wait for the popup 31 machine.screenshot("popup") 32 machine.succeed("xdotool key --delay 100 p r e f e r e n c e s Return") 33 machine.wait_for_window("Preferences", timeout=120) 34 ''; 35 } 36)