summary refs log tree commit diff
path: root/nixos/tests/sgtpuzzles.nix
blob: b8d25d42d312f2e8a845aaa0ace1c4cf01d7f420 (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
27
28
29
30
31
32
33
34
import ./make-test-python.nix ({ pkgs, ...} :
{
  name = "sgtpuzzles";
  meta = with pkgs.lib.maintainers; {
    maintainers = [ tomfitzhenry ];
  };

  nodes.machine = { ... }:

  {
    imports = [
      ./common/x11.nix
    ];

    services.xserver.enable = true;
    environment.systemPackages = with pkgs; [
      sgtpuzzles
    ];
  };

  enableOCR = true;

  testScript = { nodes, ... }:
  ''
    start_all()
    machine.wait_for_x()

    machine.execute("mines >&2 &")

    machine.wait_for_window("Mines")
    machine.wait_for_text("Marked")
    machine.screenshot("mines")
  '';
})