diff options
author | Sam Parkinson <sam@sam.today> | 2018-02-15 07:34:50 +1100 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2018-02-14 22:25:12 +0100 |
commit | 16fa6f59f77fd635665ba719e278bc673ceb1d9e (patch) | |
tree | 9e615fc3fc7435a525308a0f672b64afc4ba7f3f /nixos/tests | |
parent | 8f316ff3981269c6ee51eb36422b095eac079e4d (diff) |
nixos/plotinus: add module to enable plotinus
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/plotinus.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/nixos/tests/plotinus.nix b/nixos/tests/plotinus.nix new file mode 100644 index 0000000000000..557d65f7960a9 --- /dev/null +++ b/nixos/tests/plotinus.nix @@ -0,0 +1,27 @@ +import ./make-test.nix ({ pkgs, ... }: { + name = "plotinus"; + meta = { + maintainers = pkgs.plotinus.meta.maintainers; + }; + + machine = + { config, pkgs, ... }: + + { imports = [ ./common/x11.nix ]; + programs.plotinus.enable = true; + environment.systemPackages = [ pkgs.gnome3.gnome-calculator pkgs.xdotool ]; + }; + + testScript = + '' + $machine->waitForX; + $machine->execute("xterm -e 'gnome-calculator' &"); + $machine->waitForWindow(qr/Calculator/); + $machine->execute("xdotool key ctrl+shift+p"); + $machine->sleep(1); # wait for the popup + $machine->execute("xdotool key p r e f e r e n c e s Return"); + $machine->waitForWindow(qr/Preferences/); + $machine->screenshot("screen"); + ''; + +}) |