about summary refs log tree commit diff
path: root/tests/aszlig/programs/psi.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tests/aszlig/programs/psi.nix')
-rw-r--r--tests/aszlig/programs/psi.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/aszlig/programs/psi.nix b/tests/aszlig/programs/psi.nix
new file mode 100644
index 00000000..5ab34da3
--- /dev/null
+++ b/tests/aszlig/programs/psi.nix
@@ -0,0 +1,26 @@
+{ nixpkgsPath, ... }:
+
+{
+  name = "psi-test";
+
+  machine = { pkgs, ... }: {
+    imports = [
+      "${nixpkgsPath}/nixos/tests/common/user-account.nix"
+      "${nixpkgsPath}/nixos/tests/common/x11.nix"
+    ];
+    services.xserver.displayManager.auto.enable = true;
+    services.xserver.displayManager.auto.user = "alice";
+    environment.systemPackages = [ pkgs.vuizvui.aszlig.psi ];
+  };
+
+  enableOCR = true;
+
+  testScript = ''
+    $machine->waitForX;
+    $machine->waitForFile("/home/alice/.Xauthority");
+    $machine->succeed("xauth merge ~alice/.Xauthority");
+    $machine->succeed('su -c "DISPLAY=:0.0 psi" - alice &');
+    $machine->waitForText(qr/Register new account/i);
+    $machine->screenshot('psi');
+  '';
+}