at 23.11-beta 1.1 kB view raw
1import ./make-test-python.nix ({ lib, ...} : { 2 name = "ragnarwm"; 3 4 meta = { 5 maintainers = with lib.maintainers; [ sigmanificient ]; 6 }; 7 8 nodes.machine = { pkgs, lib, ... }: { 9 imports = [ ./common/x11.nix ./common/user-account.nix ]; 10 test-support.displayManager.auto.user = "alice"; 11 services.xserver.displayManager.defaultSession = lib.mkForce "ragnar"; 12 services.xserver.windowManager.ragnarwm.enable = true; 13 14 # Setup the default terminal of Ragnar 15 environment.systemPackages = [ pkgs.alacritty ]; 16 }; 17 18 testScript = '' 19 with subtest("ensure x starts"): 20 machine.wait_for_x() 21 machine.wait_for_file("/home/alice/.Xauthority") 22 machine.succeed("xauth merge ~alice/.Xauthority") 23 24 with subtest("ensure we can open a new terminal"): 25 # Sleeping a bit before the test, as it may help for sending keys 26 machine.sleep(2) 27 machine.send_key("meta_l-ret") 28 machine.wait_for_window(r"alice.*?machine") 29 machine.sleep(2) 30 machine.screenshot("terminal") 31 ''; 32})