start_with_launcher: adjust for new overview behaviour

The annoying submenus in the overview app list now scroll right
not down :/ have to adapt this function for that. Had to move
get_release_number earlier because perl ordering.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2020-07-09 15:54:33 -07:00
parent a3943dc307
commit 15eae21722

View File

@ -52,6 +52,16 @@ sub type_very_safely {
wait_still_screen(stilltime=>5, similarity_level=>45); wait_still_screen(stilltime=>5, similarity_level=>45);
} }
sub get_release_number {
# return the release number; so usually VERSION, but for Rawhide,
# we return RAWREL. This allows us to avoid constantly doing stuff
# like `if ($version eq "Rawhide" || $version > 30)`.
my $version = get_var("VERSION");
my $rawrel = get_var("RAWREL", "Rawhide");
return $rawrel if ($version eq "Rawhide");
return $version
}
# Figure out what tty the desktop is on, switch to it. Assumes we're # Figure out what tty the desktop is on, switch to it. Assumes we're
# at a root console # at a root console
sub desktop_vt { sub desktop_vt {
@ -814,8 +824,19 @@ sub start_with_launcher {
} }
# Click on the launcher # Click on the launcher
if (!check_screen($launcher)) { if (!check_screen($launcher)) {
# On F33+, this subwindow thingy scrolls horizontally,
# but only after we hit 'down' twice to get into it.
# On F32 and earlier, it just scrolls vertically
my $relnum = get_release_number;
if ($relnum > 32) {
send_key 'down';
send_key 'down';
send_key_until_needlematch($launcher, 'right', 5, 6);
}
else {
send_key_until_needlematch($launcher, 'down', 5, 6); send_key_until_needlematch($launcher, 'down', 5, 6);
} }
}
assert_and_click $launcher; assert_and_click $launcher;
wait_still_screen 5; wait_still_screen 5;
} }
@ -1001,16 +1022,6 @@ sub bypass_1691487 {
} }
} }
sub get_release_number {
# return the release number; so usually VERSION, but for Rawhide,
# we return RAWREL. This allows us to avoid constantly doing stuff
# like `if ($version eq "Rawhide" || $version > 30)`.
my $version = get_var("VERSION");
my $rawrel = get_var("RAWREL", "Rawhide");
return $rawrel if ($version eq "Rawhide");
return $version
}
sub workaround_ble26 { sub workaround_ble26 {
# FIXME: workaround for # FIXME: workaround for
# https://pagure.io/background-logo-extension/issue/26 # https://pagure.io/background-logo-extension/issue/26