2016-06-01 16:05:46 +01:00
|
|
|
import ./make-test.nix ({ pkgs, ...} :
|
|
|
|
|
|
|
|
{
|
2017-03-03 13:25:45 +00:00
|
|
|
name = "plasma5";
|
2015-12-11 13:08:07 +00:00
|
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
|
|
|
maintainers = [ ttuegel ];
|
|
|
|
};
|
|
|
|
|
|
|
|
machine = { lib, ... }: {
|
|
|
|
imports = [ ./common/user-account.nix ];
|
|
|
|
services.xserver.enable = true;
|
2017-03-24 13:02:24 +00:00
|
|
|
services.xserver.displayManager.sddm.enable = true;
|
2017-03-01 01:09:56 +00:00
|
|
|
services.xserver.desktopManager.plasma5.enable = true;
|
|
|
|
services.xserver.desktopManager.default = "plasma5";
|
2017-03-24 13:02:24 +00:00
|
|
|
virtualisation.memorySize = 1024;
|
2015-12-11 13:08:07 +00:00
|
|
|
};
|
|
|
|
|
2017-03-24 13:02:24 +00:00
|
|
|
enableOCR = true;
|
|
|
|
|
|
|
|
testScript = { nodes, ... }: let
|
|
|
|
user = nodes.machine.config.users.extraUsers.alice;
|
|
|
|
xdo = "${pkgs.xdotool}/bin/xdotool";
|
|
|
|
in ''
|
2016-09-09 16:09:45 +01:00
|
|
|
startAll;
|
|
|
|
|
2017-03-24 13:02:24 +00:00
|
|
|
# Wait for display manager to start
|
|
|
|
$machine->waitForText(qr/${user.description}/);
|
|
|
|
$machine->screenshot("sddm");
|
|
|
|
|
|
|
|
# Log in
|
|
|
|
$machine->sendChars("${user.password}\n");
|
2016-09-09 16:09:45 +01:00
|
|
|
$machine->waitForFile("/home/alice/.Xauthority");
|
|
|
|
$machine->succeed("xauth merge ~alice/.Xauthority");
|
2016-06-01 16:05:46 +01:00
|
|
|
|
|
|
|
$machine->waitUntilSucceeds("pgrep plasmashell");
|
2016-09-09 16:09:45 +01:00
|
|
|
$machine->waitForWindow("^Desktop ");
|
2016-06-01 16:05:46 +01:00
|
|
|
|
|
|
|
# Check that logging in has given the user ownership of devices.
|
|
|
|
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
|
2016-09-09 16:09:45 +01:00
|
|
|
|
|
|
|
$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");
|
2016-06-01 16:05:46 +01:00
|
|
|
|
|
|
|
$machine->execute("${xdo} key Alt+F1 sleep 10");
|
|
|
|
$machine->screenshot("screen");
|
2015-12-11 13:08:07 +00:00
|
|
|
'';
|
|
|
|
})
|