1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-22 14:03:09 +00:00

check_desktop: handle GNOME showing inactive button briefly

check_desktop tries to catch when the overview is open and close
it. But with GNOME 42, it seems the inactive "Activities" button
is shown briefly on login before GNOME opens the overview. If
check_desktop catches that, it will think the overview isn't
open and it doesn't need to do anything. So if we match on first
cycle through the loop, let's wait_still_screen then match again.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2022-03-01 10:24:48 -08:00
parent f75cd0e732
commit abd1d1a698

View File

@ -877,14 +877,12 @@ sub anaconda_create_user {
sub check_desktop { sub check_desktop {
# Check we're at a desktop. We do this by looking for the "apps" # Check we're at a desktop. We do this by looking for the "apps"
# menu button ("Activities" button on GNOME, kicker button on # menu button ("Activities" button on GNOME, kicker button on
# KDE). This is set up as a helper function because, for a while, # KDE). This is set up as a helper function so we can handle
# GNOME made the top bar translucent by default *and* we had an # GNOME's behaviour of opening the overview on first login; all
# animated background by default, which made doing this solely # our tests were written when GNOME *didn't* do that, so it
# with needle matches hard, so we had a workaround of trying to # would be awkward to find all the places in them where we need
# open the overview with the super key and match on the app grid # to close the overview. Instead, we just have this function
# icon. But GNOME has gone back to the top bar being a solid color # close it if it's open.
# by default, so we don't have this problem any more and this is
# back to just being a simple needle match.
my %args = ( my %args = (
timeout => 30, timeout => 30,
@_ @_
@ -894,8 +892,14 @@ sub check_desktop {
while ($count > 0) { while ($count > 0) {
$count -= 1; $count -= 1;
assert_screen "apps_menu_button", $args{timeout}; assert_screen "apps_menu_button", $args{timeout};
# GNOME 40 starts on the overview by default; for consistency with if ($count == 4) {
# older GNOME and KDE, let's just close it # GNOME 42 shows the inactive menu button briefly before
# opening the overview. So we need to wait a bit on first
# cycle in case GNOME is about to open the overview.
wait_still_screen 5;
assert_screen "apps_menu_button";
}
# Here's where we detect if the overview is open and close it
if (match_has_tag "apps_menu_button_active") { if (match_has_tag "apps_menu_button_active") {
$activematched = 1; $activematched = 1;
wait_still_screen 5; wait_still_screen 5;