depot/third_party/nixpkgs/nixos/tests/qtile.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

34 lines
1,013 B
Nix

import ./make-test-python.nix ({ lib, ...} : {
name = "qtile";
meta = {
maintainers = with lib.maintainers; [ sigmanificient ];
};
nodes.machine = { pkgs, lib, ... }: {
imports = [ ./common/x11.nix ./common/user-account.nix ];
test-support.displayManager.auto.user = "alice";
services.xserver.windowManager.qtile.enable = true;
services.displayManager.defaultSession = lib.mkForce "qtile";
environment.systemPackages = [ pkgs.kitty ];
};
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 client is available"):
machine.succeed("qtile --version")
with subtest("ensure we can open a new terminal"):
machine.sleep(2)
machine.send_key("meta_l-ret")
machine.wait_for_window(r"alice.*?machine")
machine.sleep(2)
machine.screenshot("terminal")
'';
})