at 25.11-pre 2.2 kB view raw
1import ./make-test-python.nix ( 2 { pkgs, ... }: 3 4 { 5 name = "plasma6"; 6 meta = with pkgs.lib.maintainers; { 7 maintainers = [ k900 ]; 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 # FIXME: this should be testing Wayland 18 services.displayManager.defaultSession = "plasmax11"; 19 services.desktopManager.plasma6.enable = true; 20 environment.plasma6.excludePackages = [ pkgs.kdePackages.elisa ]; 21 services.displayManager.autoLogin = { 22 enable = true; 23 user = "alice"; 24 }; 25 }; 26 27 testScript = 28 { nodes, ... }: 29 let 30 user = nodes.machine.users.users.alice; 31 xdo = "${pkgs.xdotool}/bin/xdotool"; 32 in 33 '' 34 with subtest("Wait for login"): 35 start_all() 36 machine.wait_for_file("/tmp/xauth_*") 37 machine.succeed("xauth merge /tmp/xauth_*") 38 39 with subtest("Check plasmashell started"): 40 machine.wait_until_succeeds("pgrep plasmashell") 41 machine.wait_for_window("^Desktop ") 42 43 with subtest("Check that KDED is running"): 44 machine.succeed("pgrep kded6") 45 46 with subtest("Ensure Elisa is not installed"): 47 machine.fail("which elisa") 48 49 machine.succeed("su - ${user.name} -c 'xauth merge /tmp/xauth_*'") 50 51 with subtest("Run Dolphin"): 52 machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 dolphin >&2 &'") 53 machine.wait_for_window(" Dolphin") 54 55 with subtest("Run Konsole"): 56 machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 konsole >&2 &'") 57 machine.wait_for_window("Konsole") 58 59 with subtest("Run systemsettings"): 60 machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 systemsettings >&2 &'") 61 machine.wait_for_window("Settings") 62 63 with subtest("Wait to get a screenshot"): 64 machine.execute( 65 "${xdo} key Alt+F1 sleep 10" 66 ) 67 machine.screenshot("screen") 68 ''; 69 } 70)