diff --git a/nixos/tests/sddm-kde5.nix b/nixos/tests/sddm-kde5.nix index 0247d267aaa4..787dd2f8cbdd 100644 --- a/nixos/tests/sddm-kde5.nix +++ b/nixos/tests/sddm-kde5.nix @@ -24,29 +24,26 @@ import ./make-test.nix ({ pkgs, ...} : testScript = { nodes, ... }: let xdo = "${pkgs.xdotool}/bin/xdotool"; in - '' - sub krunner { - my ($win,) = @_; - $machine->execute("${xdo} key Alt+F2 sleep 1 type $win"); - $machine->execute("${xdo} search --sync --onlyvisible --class krunner sleep 5 key Return"); - } + '' + startAll; + + $machine->waitForFile("/home/alice/.Xauthority"); + $machine->succeed("xauth merge ~alice/.Xauthority"); $machine->waitUntilSucceeds("pgrep plasmashell"); - $machine->succeed("xauth merge ~alice/.Xauthority"); - $machine->waitForWindow(qr/Desktop.*/); + $machine->waitForWindow("^Desktop "); # Check that logging in has given the user ownership of devices. $machine->succeed("getfacl /dev/snd/timer | grep -q alice"); - - krunner("dolphin"); - $machine->waitForWindow(qr/.*Dolphin/); - - krunner("konsole"); - $machine->waitForWindow(qr/.*Konsole/); - - krunner("systemsettings5"); - $machine->waitForWindow(qr/.*Settings/); - $machine->sleep(20); + + $machine->execute("su - alice -c 'DISPLAY=:0.0 dolphin &'"); + $machine->waitForWindow(" Dolphin"); + + $machine->execute("su - alice -c 'DISPLAY=:0.0 konsole &'"); + $machine->waitForWindow("Konsole"); + + $machine->execute("su - alice -c 'DISPLAY=:0.0 systemsettings5 &'"); + $machine->waitForWindow("Settings"); $machine->execute("${xdo} key Alt+F1 sleep 10"); $machine->screenshot("screen");