about summary refs log tree commit diff
path: root/nixpkgs/nixos/tests/sgt-puzzles.nix
blob: 4c5210bfce77823c264ef21dd55b83f8e3d20735 (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 = "sgt-puzzles";
  meta = with pkgs.lib.maintainers; {
    maintainers = [ tomfitzhenry ];
  };

  nodes.machine = { ... }:

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

    services.xserver.enable = true;
    environment.systemPackages = with pkgs; [
      sgt-puzzles
    ];
  };

  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")
  '';
})