summary refs log tree commit diff
path: root/nixos/tests/plotinus.nix
diff options
context:
space:
mode:
authorSam Parkinson <sam@sam.today>2018-02-15 07:34:50 +1100
committerJan Tojnar <jtojnar@gmail.com>2018-02-14 22:25:12 +0100
commit16fa6f59f77fd635665ba719e278bc673ceb1d9e (patch)
tree9e615fc3fc7435a525308a0f672b64afc4ba7f3f /nixos/tests/plotinus.nix
parent8f316ff3981269c6ee51eb36422b095eac079e4d (diff)
downloadnixlib-16fa6f59f77fd635665ba719e278bc673ceb1d9e.tar
nixlib-16fa6f59f77fd635665ba719e278bc673ceb1d9e.tar.gz
nixlib-16fa6f59f77fd635665ba719e278bc673ceb1d9e.tar.bz2
nixlib-16fa6f59f77fd635665ba719e278bc673ceb1d9e.tar.lz
nixlib-16fa6f59f77fd635665ba719e278bc673ceb1d9e.tar.xz
nixlib-16fa6f59f77fd635665ba719e278bc673ceb1d9e.tar.zst
nixlib-16fa6f59f77fd635665ba719e278bc673ceb1d9e.zip
nixos/plotinus: add module to enable plotinus
Diffstat (limited to 'nixos/tests/plotinus.nix')
-rw-r--r--nixos/tests/plotinus.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/nixos/tests/plotinus.nix b/nixos/tests/plotinus.nix
new file mode 100644
index 000000000000..557d65f7960a
--- /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");
+    '';
+
+})