about summary refs log tree commit diff
path: root/nixos/tests/qtile.nix
diff options
context:
space:
mode:
authorSigmanificient <edhyjox@gmail.com>2024-04-22 19:00:41 +0200
committerSigmanificient <edhyjox@gmail.com>2024-04-22 19:00:41 +0200
commit1cdb19472c79d7380cf36352d529bde52648dc98 (patch)
tree84d9c054ae279da879abfc2664d06a3abcc319bc /nixos/tests/qtile.nix
parent06fc87533759bb6243ca4114a1edd7f7d8068396 (diff)
qtile: add passthru tests
Diffstat (limited to 'nixos/tests/qtile.nix')
-rw-r--r--nixos/tests/qtile.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/nixos/tests/qtile.nix b/nixos/tests/qtile.nix
new file mode 100644
index 0000000000000..b4d8f9d421144
--- /dev/null
+++ b/nixos/tests/qtile.nix
@@ -0,0 +1,34 @@
+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 "none+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")
+  '';
+})