summaryrefslogtreecommitdiffstats
path: root/nixos/tests/nimdow.nix
blob: 7d1d815bcd131c7b1f48b85e46e1dc10966f21e6 (plain)
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
{ pkgs, ... }:
{
  name = "nimdow";
  meta = with pkgs.lib.maintainers; {
    maintainers = [ marcusramberg ];
  };

  nodes.machine =
    { lib, ... }:
    {
      imports = [
        ./common/x11.nix
        ./common/user-account.nix
      ];
      test-support.displayManager.auto.user = "alice";
      services.displayManager.defaultSession = lib.mkForce "none+nimdow";
      services.xserver.windowManager.nimdow.enable = true;
    };

  testScript =
    { ... }:
    ''
      with subtest("ensure x starts"):
          machine.wait_for_x()
          machine.wait_for_file("/home/alice/.Xauthority")
          machine.succeed("xauth merge ~alice/.Xauthority")

      with subtest("ensure we can open a new terminal"):
          machine.send_key("meta_l-ret")
          machine.wait_for_window(r"alice.*?machine")
          machine.screenshot("terminal")
    '';
}