1 import ./make-test-python.nix ({ pkgs, ...} : {
3 meta = with pkgs.lib.maintainers; {
4 maintainers = [ aszlig ];
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+i3";
11 services.xserver.windowManager.i3.enable = true;
14 testScript = { ... }: ''
15 with subtest("ensure x starts"):
17 machine.wait_for_file("/home/alice/.Xauthority")
18 machine.succeed("xauth merge ~alice/.Xauthority")
20 with subtest("ensure we get first configuration window"):
21 machine.wait_for_window(r".*?first configuration.*?")
23 machine.screenshot("started")
25 with subtest("ensure we generate and save a config"):
26 # press return to indicate we want to gen a new config
27 machine.send_key("\n")
29 machine.screenshot("preconfig")
30 # press alt then return to indicate we want to use alt as our Mod key
31 machine.send_key("alt")
32 machine.send_key("\n")
34 # make sure the config file is created before we continue
35 machine.wait_for_file("/home/alice/.config/i3/config")
36 machine.screenshot("postconfig")
39 with subtest("ensure we can open a new terminal"):
40 machine.send_key("alt-ret")
42 machine.wait_for_window(r"alice.*?machine")
44 machine.screenshot("terminal")