1 import ./make-test-python.nix ({ pkgs, lib, ...} :
7 maintainers = teams.pantheon.members;
10 nodes.machine = { ... }:
13 imports = [ ./common/user-account.nix ];
15 services.xserver.enable = true;
16 services.xserver.desktopManager.pantheon.enable = true;
22 testScript = { nodes, ... }: let
23 user = nodes.machine.config.users.users.alice;
24 bob = nodes.machine.config.users.users.bob;
26 machine.wait_for_unit("display-manager.service")
28 with subtest("Test we can see usernames in elementary-greeter"):
29 machine.wait_for_text("${user.description}")
30 # OCR was struggling with this one.
31 # machine.wait_for_text("${bob.description}")
32 machine.screenshot("elementary_greeter_lightdm")
34 with subtest("Login with elementary-greeter"):
35 machine.send_chars("${user.password}\n")
37 machine.wait_for_file("${user.home}/.Xauthority")
38 machine.succeed("xauth merge ${user.home}/.Xauthority")
40 with subtest("Check that logging in has given the user ownership of devices"):
41 machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}")
43 # TODO: DBus API could eliminate this? Pantheon uses Bamf.
44 with subtest("Check if pantheon session components actually start"):
45 machine.wait_until_succeeds("pgrep gala")
46 machine.wait_for_window("gala")
47 machine.wait_until_succeeds("pgrep -f io.elementary.wingpanel")
48 machine.wait_for_window("io.elementary.wingpanel")
49 machine.wait_until_succeeds("pgrep plank")
50 machine.wait_for_window("plank")
52 with subtest("Open elementary terminal"):
53 machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.terminal >&2 &'")
54 machine.wait_for_window("io.elementary.terminal")
56 machine.screenshot("screen")