at 25.11-pre 2.3 kB view raw
1import ./make-test-python.nix ( 2 { pkgs, ... }: 3 4 { 5 name = "plasma5"; 6 meta = with pkgs.lib.maintainers; { 7 maintainers = [ ttuegel ]; 8 }; 9 10 nodes.machine = 11 { ... }: 12 13 { 14 imports = [ ./common/user-account.nix ]; 15 services.xserver.enable = true; 16 services.displayManager.sddm.enable = true; 17 services.displayManager.defaultSession = "plasma"; 18 services.xserver.desktopManager.plasma5.enable = true; 19 environment.plasma5.excludePackages = [ pkgs.plasma5Packages.elisa ]; 20 services.displayManager.autoLogin = { 21 enable = true; 22 user = "alice"; 23 }; 24 }; 25 26 testScript = 27 { nodes, ... }: 28 let 29 user = nodes.machine.users.users.alice; 30 xdo = "${pkgs.xdotool}/bin/xdotool"; 31 in 32 '' 33 with subtest("Wait for login"): 34 start_all() 35 machine.wait_for_file("/tmp/xauth_*") 36 machine.succeed("xauth merge /tmp/xauth_*") 37 38 with subtest("Check plasmashell started"): 39 machine.wait_until_succeeds("pgrep plasmashell") 40 machine.wait_for_window("^Desktop ") 41 42 with subtest("Check that KDED is running"): 43 machine.succeed("pgrep kded5") 44 45 with subtest("Check that logging in has given the user ownership of devices"): 46 machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}") 47 48 with subtest("Ensure Elisa is not installed"): 49 machine.fail("which elisa") 50 51 machine.succeed("su - ${user.name} -c 'xauth merge /tmp/xauth_*'") 52 53 with subtest("Run Dolphin"): 54 machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 dolphin >&2 &'") 55 machine.wait_for_window(" Dolphin") 56 57 with subtest("Run Konsole"): 58 machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 konsole >&2 &'") 59 machine.wait_for_window("Konsole") 60 61 with subtest("Run systemsettings"): 62 machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 systemsettings5 >&2 &'") 63 machine.wait_for_window("Settings") 64 65 with subtest("Wait to get a screenshot"): 66 machine.execute( 67 "${xdo} key Alt+F1 sleep 10" 68 ) 69 machine.screenshot("screen") 70 ''; 71 } 72)