diff options
author | Joel Moberg <joel.moberg@gmail.com> | 2016-06-01 17:05:46 +0200 |
---|---|---|
committer | Joel Moberg <joel.moberg@gmail.com> | 2016-06-01 17:09:51 +0200 |
commit | 20826c2a5df80c3f90c8a6adc9b813fb4c32376e (patch) | |
tree | f07e316a005bd78be2af02179aba22c9c8d4c5dd /nixos | |
parent | 5f8d14546b6a5a5df8a4768833497a674083dd8e (diff) |
nixos kde5: improve test
IceWM is not part of KDE 5 and is now no longer part of the test. KDE 5 applications: Dolphin, System Monitor, and System Settings are started in this test.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/tests/sddm-kde5.nix | 41 |
1 files changed, 32 insertions, 9 deletions
diff --git a/nixos/tests/sddm-kde5.nix b/nixos/tests/sddm-kde5.nix index f97a6d12b63c6..0247d267aaa48 100644 --- a/nixos/tests/sddm-kde5.nix +++ b/nixos/tests/sddm-kde5.nix @@ -1,4 +1,6 @@ -import ./make-test.nix ({ pkgs, ...} : { +import ./make-test.nix ({ pkgs, ...} : + +{ name = "sddm"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ ttuegel ]; @@ -6,6 +8,7 @@ import ./make-test.nix ({ pkgs, ...} : { machine = { lib, ... }: { imports = [ ./common/user-account.nix ]; + virtualisation.memorySize = 1024; services.xserver.enable = true; services.xserver.displayManager.sddm = { enable = true; @@ -14,18 +17,38 @@ import ./make-test.nix ({ pkgs, ...} : { user = "alice"; }; }; - services.xserver.windowManager.default = "icewm"; - services.xserver.windowManager.icewm.enable = true; - services.xserver.desktopManager.default = "none"; services.xserver.desktopManager.kde5.enable = true; }; enableOCR = true; - testScript = { nodes, ... }: '' - startAll; - $machine->waitForFile("/home/alice/.Xauthority"); - $machine->succeed("xauth merge ~alice/.Xauthority"); - $machine->waitForWindow("^IceWM "); + 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"); + } + + $machine->waitUntilSucceeds("pgrep plasmashell"); + $machine->succeed("xauth merge ~alice/.Xauthority"); + $machine->waitForWindow(qr/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("${xdo} key Alt+F1 sleep 10"); + $machine->screenshot("screen"); ''; }) |