2024-02-05 16:04:04 +00:00
|
|
|
import ./make-test-python.nix (
|
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
2024-02-27 20:28:05 +00:00
|
|
|
name = "plasma6";
|
2024-02-05 16:04:04 +00:00
|
|
|
meta = with pkgs.lib.maintainers; {
|
2024-02-27 20:28:05 +00:00
|
|
|
maintainers = [ k900 ];
|
2024-02-05 16:04:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nodes.machine =
|
2024-12-10 19:26:33 +00:00
|
|
|
{ ... }:
|
|
|
|
|
|
|
|
{
|
2024-02-05 16:04:04 +00:00
|
|
|
imports = [ ./common/user-account.nix ];
|
|
|
|
services.xserver.enable = true;
|
2024-02-27 20:28:05 +00:00
|
|
|
services.displayManager.sddm.enable = true;
|
2024-02-05 16:04:04 +00:00
|
|
|
# FIXME: this should be testing Wayland
|
2024-02-27 20:28:05 +00:00
|
|
|
services.displayManager.defaultSession = "plasmax11";
|
|
|
|
services.desktopManager.plasma6.enable = true;
|
2024-02-05 16:04:04 +00:00
|
|
|
environment.plasma6.excludePackages = [ pkgs.kdePackages.elisa ];
|
2024-02-27 20:28:05 +00:00
|
|
|
services.displayManager.autoLogin = {
|
2024-02-05 16:04:04 +00:00
|
|
|
enable = true;
|
|
|
|
user = "alice";
|
2024-12-10 19:26:33 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-02-05 16:04:04 +00:00
|
|
|
testScript =
|
|
|
|
{ nodes, ... }:
|
|
|
|
let
|
|
|
|
user = nodes.machine.users.users.alice;
|
|
|
|
xdo = "${pkgs.xdotool}/bin/xdotool";
|
|
|
|
in
|
|
|
|
''
|
|
|
|
with subtest("Wait for login"):
|
|
|
|
start_all()
|
|
|
|
machine.wait_for_file("/tmp/xauth_*")
|
|
|
|
machine.succeed("xauth merge /tmp/xauth_*")
|
|
|
|
|
|
|
|
with subtest("Check plasmashell started"):
|
|
|
|
machine.wait_until_succeeds("pgrep plasmashell")
|
|
|
|
machine.wait_for_window("^Desktop ")
|
|
|
|
|
|
|
|
with subtest("Check that KDED is running"):
|
|
|
|
machine.succeed("pgrep kded6")
|
|
|
|
|
|
|
|
with subtest("Ensure Elisa is not installed"):
|
|
|
|
machine.fail("which elisa")
|
|
|
|
|
|
|
|
machine.succeed("su - ${user.name} -c 'xauth merge /tmp/xauth_*'")
|
|
|
|
|
|
|
|
with subtest("Run Dolphin"):
|
|
|
|
machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 dolphin >&2 &'")
|
|
|
|
machine.wait_for_window(" Dolphin")
|
|
|
|
|
|
|
|
with subtest("Run Konsole"):
|
|
|
|
machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 konsole >&2 &'")
|
|
|
|
machine.wait_for_window("Konsole")
|
|
|
|
|
|
|
|
with subtest("Run systemsettings"):
|
|
|
|
machine.execute("su - ${user.name} -c 'DISPLAY=:0.0 systemsettings >&2 &'")
|
|
|
|
machine.wait_for_window("Settings")
|
|
|
|
|
|
|
|
with subtest("Wait to get a screenshot"):
|
|
|
|
machine.execute(
|
|
|
|
"${xdo} key Alt+F1 sleep 10"
|
|
|
|
)
|
|
|
|
machine.screenshot("screen")
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
)
|