Robustify and tweak switch out of overview on GNOME boot

This fails sometimes just because we're too early, or something.
Also with GNOME Shell 41rc, alt-f1 no longer works to open and
close the overview. super *does* seem to work in KDE these days,
so let's switch from alt-f1 to super everywhere.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2021-09-06 08:34:45 -07:00
parent 5d0309b147
commit 9882ddcaa5
6 changed files with 46 additions and 26 deletions

View File

@ -875,13 +875,27 @@ sub check_desktop {
timeout => 30,
@_
);
assert_screen "apps_menu_button", $args{timeout};
# GNOME 40 starts on the overview by default; for consistency with
# older GNOME and KDE, let's just close it
if (match_has_tag "apps_menu_button_active") {
wait_still_screen 3;
send_key "alt-f1";
assert_screen "apps_menu_button_inactive";
my $count = 5;
my $activematched = 0;
while ($count > 0) {
$count -= 1;
assert_screen "apps_menu_button", $args{timeout};
# GNOME 40 starts on the overview by default; for consistency with
# older GNOME and KDE, let's just close it
if (match_has_tag "apps_menu_button_active") {
$activematched = 1;
wait_still_screen 5;
send_key "super";
wait_still_screen 5;
}
else {
# this means we saw 'inactive', which is what we want
last;
}
}
if ($activematched) {
# make sure we got to inactive after active
die "never reached apps_menu_button_inactive!" unless (match_has_tag "apps_menu_button_inactive");
}
}
@ -928,7 +942,7 @@ sub start_with_launcher {
# The following varies for different desktops.
if ($desktop eq 'gnome') {
# Start the Activities page
send_key 'alt-f1';
send_key 'super';
wait_still_screen 5;
# Click on the menu icon to come into the menus
@ -1128,8 +1142,7 @@ sub menu_launch_type {
# launcher, typing the specified string and hitting enter. Pass
# the string to be typed to launch whatever it is you want.
my $app = shift;
# super does not work on KDE, because fml
send_key 'alt-f1';
send_key 'super';
# srsly KDE y u so slo
wait_still_screen 3;
type_very_safely $app;

View File

@ -113,8 +113,22 @@ sub run {
else {
# on lives, we have to explicitly launch anaconda
if (get_var('LIVE')) {
assert_screen ["live_start_anaconda_icon", "apps_menu_button_active"], 300;
send_key "alt-f1" if match_has_tag "apps_menu_button_active";
my $count = 5;
while ($count > 0) {
$count -= 1;
assert_screen ["live_start_anaconda_icon", "apps_menu_button_active"], 300;
if (match_has_tag "apps_menu_button_active") {
# give GNOME some time to be sure it's done starting up
# and ready for input
wait_still_screen 5;
send_key "super";
wait_still_screen 5;
}
else {
# this means we saw the launcher, which is what we want
last;
}
}
# for KDE we need to double-click after kde-settings-34.6-1,
# which is stable now.
# FIXME: when F33 goes EOL, make the condition just "if kde"

View File

@ -20,7 +20,7 @@ sub run {
}
# do this from the overview because the desktop uses the stupid
# transparent top bar which messes with our needles
send_key "alt-f1";
send_key "super";
assert_screen "overview_app_grid";
# check both layouts are available at the desktop; here,
# we can expect input method switching to work too
@ -33,7 +33,7 @@ sub run {
# wait a bit for input switch to complete
sleep 3;
# assume we can test input from whatever 'alt-f1' opened
# assume we can test input from whatever 'super' opened
type_safely "yama";
assert_screen "desktop_yama_hiragana";
send_key "spc";

View File

@ -8,10 +8,8 @@ use utils;
sub run {
my $self = shift;
# start the settings application
send_key 'alt-f1';
type_very_safely 'settings';
send_key 'ret';
menu_launch_type 'settings';
# select Background menu item
assert_and_click 'apps_settings_menu_background';
wait_still_screen 5;

View File

@ -3,17 +3,12 @@ use strict;
use testapi;
use utils;
# This test tests if Terminal starts and uses it to change desktop settings for all the following tests.
# Therefore, if you want to use all the tests from the APPS family, this should be the very first to do.
# This test tests if Terminal starts.
sub run {
my $self = shift;
# open the application
send_key 'alt-f1';
wait_still_screen 2;
type_very_safely 'terminal';
send_key 'ret';
wait_still_screen 5;
menu_launch_type "terminal";
assert_screen "apps_run_terminal";
# Register application

View File

@ -28,7 +28,7 @@ sub _open_new_tab {
sub run {
my $self = shift;
check_desktop;
send_key 'alt-f1';
send_key 'super';
# wait out animations
wait_still_screen(stilltime=>4, similarity_level=>45);
assert_and_click 'browser_launcher';