1 import ./make-test-python.nix ({ pkgs, ...} : {
3 meta = with pkgs.lib.maintainers; {
4 maintainers = [ takagiy ];
7 nodes.machine = { lib, ... }: {
8 imports = [ ./common/x11.nix ./common/user-account.nix ];
9 test-support.displayManager.auto.user = "alice";
10 services.xserver.displayManager.defaultSession = lib.mkForce "none+wmderland";
11 services.xserver.windowManager.wmderland.enable = true;
13 systemd.services.setupWmderlandConfig = {
14 wantedBy = [ "multi-user.target" ];
15 before = [ "multi-user.target" ];
21 RemainAfterExit = true;
25 config = pkgs.writeText "config" ''
27 bindsym $Mod+Return exec ${pkgs.xterm}/bin/xterm -cm -pc
30 mkdir -p $HOME/.config/wmderland
31 cp ${config} $HOME/.config/wmderland/config
36 testScript = { ... }: ''
37 with subtest("ensure x starts"):
39 machine.wait_for_file("/home/alice/.Xauthority")
40 machine.succeed("xauth merge ~alice/.Xauthority")
42 with subtest("ensure we can open a new terminal"):
43 machine.send_key("alt-ret")
44 machine.wait_until_succeeds("pgrep xterm")
45 machine.wait_for_window(r"alice.*?machine")
46 machine.screenshot("terminal")
48 with subtest("ensure we can communicate through ipc with wmderlandc"):
49 # Kills the previously open xterm
50 machine.succeed("pgrep xterm")
51 machine.execute("DISPLAY=:0 wmderlandc kill")
52 machine.fail("pgrep xterm")