blob: 35e1d570cb8986046b65562f5e1d6619c6355395 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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')
'';
}
|