diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/aszlig/programs/flameshot.nix | 26 | ||||
-rw-r--r-- | tests/default.nix | 1 |
2 files changed, 27 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') + ''; +} diff --git a/tests/default.nix b/tests/default.nix index edc022ad..e47ddd46 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -10,6 +10,7 @@ let in { aszlig.dnyarri.luks2-bcache = callTest ./aszlig/dnyarri/luks2-bcache.nix; + aszlig.programs.flameshot = callTest aszlig/programs/flameshot.nix; aszlig.programs.psi = callTest aszlig/programs/psi.nix; games = { starbound = callTest ./games/starbound.nix; |