blob: 7c8fba130e681cd7c3e553df5d08dad806ff3cf6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
import ./make-test-python.nix ({ pkgs, ...} :
{
name = "plasma6";
meta = with pkgs.lib.maintainers; {
maintainers = [ k900 ];
};
nodes.machine = { ... }:
{
imports = [ ./common/user-account.nix ];
services.xserver.enable = true;
services.displayManager.sddm.enable = true;
# FIXME: this should be testing Wayland
services.displayManager.defaultSession = "plasmax11";
services.desktopManager.plasma6.enable = true;
environment.plasma6.excludePackages = [ pkgs.kdePackages.elisa ];
services.displayManager.autoLogin = {
enable = true;
user = "alice";
};
};
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")
'';
})
|