about summary refs log tree commit diff
path: root/tests/aszlig/programs/flameshot.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tests/aszlig/programs/flameshot.nix')
-rw-r--r--tests/aszlig/programs/flameshot.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/aszlig/programs/flameshot.nix b/tests/aszlig/programs/flameshot.nix
new file mode 100644
index 00000000..35e1d570
--- /dev/null
+++ b/tests/aszlig/programs/flameshot.nix
@@ -0,0 +1,26 @@
+{ nixpkgsPath, ... }:
+
+{
+  name = "flameshot";
+
+  machine = { pkgs, ... }: {
+    imports = [
+      "${nixpkgsPath}/nixos/tests/common/user-account.nix"
+      "${nixpkgsPath}/nixos/tests/common/x11.nix"
+    ];
+    test-support.displayManager.auto.user = "alice";
+    vuizvui.user.aszlig.programs.flameshot.enable = true;
+  };
+
+  enableOCR = true;
+
+  testScript = ''
+    # fmt: off
+    machine.wait_for_x()
+    machine.wait_for_file("/home/alice/.Xauthority")
+    machine.succeed("xauth merge ~alice/.Xauthority")
+    machine.succeed('su -c "DISPLAY=:0.0 flameshot gui" - alice &')
+    machine.wait_for_text('(?i)capture the screen')
+    machine.screenshot('flameshot')
+  '';
+}