1 import ./make-test-python.nix ({ pkgs, ...} :
5 meta = with pkgs.lib.maintainers; {
6 maintainers = [ k900 ];
9 nodes.machine = { ... }:
12 imports = [ ./common/user-account.nix ];
13 services.xserver.enable = true;
14 services.displayManager.sddm.enable = true;
15 # FIXME: this should be testing Wayland
16 services.displayManager.defaultSession = "plasmax11";
17 services.desktopManager.plasma6.enable = true;
18 environment.plasma6.excludePackages = [ pkgs.kdePackages.elisa ];
19 services.displayManager.autoLogin = {
25 testScript = { nodes, ... }: let
26 user = nodes.machine.users.users.alice;
27 xdo = "${pkgs.xdotool}/bin/xdotool";
29 with subtest("Wait for login"):
31 machine.wait_for_file("/tmp/xauth_*")
32 machine.succeed("xauth merge /tmp/xauth_*")
34 with subtest("Check plasmashell started"):
35 machine.wait_until_succeeds("pgrep plasmashell")
36 machine.wait_for_window("^Desktop ")
38 with subtest("Check that KDED is running"):
39 machine.succeed("pgrep kded6")
41 with subtest("Ensure Elisa is not installed"):
42 machine.fail("which elisa")
44 machine.succeed("su - ${user.name} -c 'xauth merge /tmp/xauth_*'")
46 with subtest("Run Dolphin"):
47 machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 dolphin >&2 &'")
48 machine.wait_for_window(" Dolphin")
50 with subtest("Run Konsole"):
51 machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 konsole >&2 &'")
52 machine.wait_for_window("Konsole")
54 with subtest("Run systemsettings"):
55 machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 systemsettings >&2 &'")
56 machine.wait_for_window("Settings")
58 with subtest("Wait to get a screenshot"):
60 "${xdo} key Alt+F1 sleep 10"
62 machine.screenshot("screen")