about summary refs log tree commit diff
path: root/nixos/tests/gnome-xorg.nix
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2023-04-06 04:04:40 +0200
committerJan Tojnar <jtojnar@gmail.com>2023-04-06 04:19:08 +0200
commitd8dde72fbb99ce7912e655a5765b4f5a42256c94 (patch)
treedab97bd59341e8512945918be953e78c9647d9aa /nixos/tests/gnome-xorg.nix
parent98d2e797e8f879a3ac7f608eac9c4c08181d874c (diff)
nixosTests.gnome: Fix tests for 44
1. Launching an app externally (like we do in tests) does not dismiss the GNOME Shell’s Activities view opened on log-in.
2. Activities view grabs input so that user can type to search.
3. Due to a regression in Mutter 44, a window focus is not acquired when Shell grabs input
   https://gitlab.gnome.org/GNOME/mutter/-/commit/3ac82a58c51a5c8db6b49e89a1232f99c79644cc

As a result, trying to determine the WMClass would throw:

    TypeError: global.display.focus_window is null

Let’s dismiss the Activities view with Escape key as a workaround.
Diffstat (limited to 'nixos/tests/gnome-xorg.nix')
-rw-r--r--nixos/tests/gnome-xorg.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/nixos/tests/gnome-xorg.nix b/nixos/tests/gnome-xorg.nix
index f520a01238309..d616d4f02351a 100644
--- a/nixos/tests/gnome-xorg.nix
+++ b/nixos/tests/gnome-xorg.nix
@@ -82,6 +82,9 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : {
           )
 
       with subtest("Open Console"):
+          # Close the Activities view so that Shell can correctly track the focused window.
+          machine.send_key("esc")
+
           machine.succeed(
               "${launchConsole}"
           )