@@ -1,9 +1,10 @@
1−import ./make-test.nix ({ pkgs, ...} :
1+import ./make-test-python.nix ({ pkgs, ...} :
22
33{
44 name = "pantheon";
5+
56 meta = with pkgs.stdenv.lib.maintainers; {
6− maintainers = [ worldofpeace ];
7+ maintainers = pkgs.pantheon.maintainers;
78 };
89
910 machine = { ... }:
@@ -21,35 +22,37 @@ import ./make-test.nix ({ pkgs, ...} :
2122
2223 testScript = { nodes, ... }: let
2324 user = nodes.machine.config.users.users.alice;
25+ bob = nodes.machine.config.users.users.bob;
2426 in ''
25− startAll;
26−
27− # Wait for display manager to start
28− $machine->waitForText(qr/${user.description}/);
29− $machine->screenshot("lightdm");
30−
31− # Log in
32− $machine->sendChars("${user.password}\n");
33− $machine->waitForFile("/home/alice/.Xauthority");
34− $machine->succeed("xauth merge ~alice/.Xauthority");
35−
36− # Check if "pantheon-shell" components actually start
37− $machine->waitUntilSucceeds("pgrep gala");
38− $machine->waitForWindow(qr/gala/);
39− $machine->waitUntilSucceeds("pgrep wingpanel");
40− $machine->waitForWindow("wingpanel");
41− $machine->waitUntilSucceeds("pgrep plank");
42− $machine->waitForWindow(qr/plank/);
43−
44− # Check that logging in has given the user ownership of devices.
45− $machine->succeed("getfacl -p /dev/snd/timer | grep -q alice");
46−
47− # Open elementary terminal
48− $machine->execute("su - alice -c 'DISPLAY=:0.0 io.elementary.terminal &'");
49− $machine->waitForWindow(qr/io.elementary.terminal/);
50−
51− # Take a screenshot of the desktop
52− $machine->sleep(20);
53− $machine->screenshot("screen");
27+ machine.wait_for_unit("display-manager.service")
28+
29+ with subtest("Test we can see usernames in elementary-greeter"):
30+ machine.wait_for_text("${user.description}")
31+ machine.wait_for_text("${bob.description}")
32+ machine.screenshot("elementary_greeter_lightdm")
33+
34+ with subtest("Login with elementary-greeter"):
35+ machine.send_chars("${user.password}\n")
36+ machine.wait_for_x()
37+ machine.wait_for_file("${user.home}/.Xauthority")
38+ machine.succeed("xauth merge ${user.home}/.Xauthority")
39+
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}")
42+
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 wingpanel")
48+ machine.wait_for_window("wingpanel")
49+ machine.wait_until_succeeds("pgrep plank")
50+ machine.wait_for_window("plank")
51+
52+ with subtest("Open elementary terminal"):
53+ machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.terminal &'")
54+ machine.wait_for_window("io.elementary.terminal")
55+ machine.sleep(20)
56+ machine.screenshot("screen")
5457 '';
5558})