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
   3ac82a58c5

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.
This commit is contained in:
Jan Tojnar 2023-04-06 04:04:40 +02:00
parent 98d2e797e8
commit d8dde72fbb
2 changed files with 6 additions and 0 deletions

@ -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}"
)

@ -79,6 +79,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}"
)