From 5461c2c4b7e753af7ac2e2b202ecfb105852f244 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Sun, 22 Jan 2023 20:45:13 +0800 Subject: [PATCH 1/3] nixosTests.pantheon: remove a TODO Pantheon is moving away from Bamf. --- nixos/tests/pantheon.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nixos/tests/pantheon.nix b/nixos/tests/pantheon.nix index 52f85f5c07da..7594c239e9b3 100644 --- a/nixos/tests/pantheon.nix +++ b/nixos/tests/pantheon.nix @@ -40,7 +40,6 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : with subtest("Check that logging in has given the user ownership of devices"): machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}") - # TODO: DBus API could eliminate this? Pantheon uses Bamf. with subtest("Check if pantheon session components actually start"): machine.wait_until_succeeds("pgrep gala") machine.wait_for_window("gala") From 009cdb01c71c5ffefcf9d831f1dec7e0cb0a6627 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Sat, 21 Jan 2023 23:23:51 +0800 Subject: [PATCH 2/3] nixosTests.pantheon: ensure switchboard starts I noticed this is something that can be easily broken during libsoup3 migration. --- nixos/tests/pantheon.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nixos/tests/pantheon.nix b/nixos/tests/pantheon.nix index 7594c239e9b3..d24d9a92c0a6 100644 --- a/nixos/tests/pantheon.nix +++ b/nixos/tests/pantheon.nix @@ -48,6 +48,12 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : machine.wait_until_succeeds("pgrep plank") machine.wait_for_window("plank") + with subtest("Open system settings"): + machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.switchboard >&2 &'") + # Wait for all plugins to be loaded before we check if the window is still there. + machine.sleep(5) + machine.wait_for_window("io.elementary.switchboard") + with subtest("Open elementary terminal"): machine.execute("su - ${user.name} -c 'DISPLAY=:0 io.elementary.terminal >&2 &'") machine.wait_for_window("io.elementary.terminal") From 30d5a2216fc0091a62841154a96d6d91d5d2aac2 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Sat, 21 Jan 2023 23:41:23 +0800 Subject: [PATCH 3/3] nixosTests.pantheon: nodes.machine.config -> nodes.machine Silence a warning: warning: Module argument `nodes.machine.config` is deprecated. Use `nodes.machine` instead. --- nixos/tests/pantheon.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/tests/pantheon.nix b/nixos/tests/pantheon.nix index d24d9a92c0a6..0773fc0472aa 100644 --- a/nixos/tests/pantheon.nix +++ b/nixos/tests/pantheon.nix @@ -20,8 +20,8 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : enableOCR = true; testScript = { nodes, ... }: let - user = nodes.machine.config.users.users.alice; - bob = nodes.machine.config.users.users.bob; + user = nodes.machine.users.users.alice; + bob = nodes.machine.users.users.bob; in '' machine.wait_for_unit("display-manager.service")