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

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, timeout => 30,
@_ @_
); );
assert_screen "apps_menu_button", $args{timeout}; my $count = 5;
# GNOME 40 starts on the overview by default; for consistency with my $activematched = 0;
# older GNOME and KDE, let's just close it while ($count > 0) {
if (match_has_tag "apps_menu_button_active") { $count -= 1;
wait_still_screen 3; assert_screen "apps_menu_button", $args{timeout};
send_key "alt-f1"; # GNOME 40 starts on the overview by default; for consistency with
assert_screen "apps_menu_button_inactive"; # 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. # The following varies for different desktops.
if ($desktop eq 'gnome') { if ($desktop eq 'gnome') {
# Start the Activities page # Start the Activities page
send_key 'alt-f1'; send_key 'super';
wait_still_screen 5; wait_still_screen 5;
# Click on the menu icon to come into the menus # 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 # launcher, typing the specified string and hitting enter. Pass
# the string to be typed to launch whatever it is you want. # the string to be typed to launch whatever it is you want.
my $app = shift; my $app = shift;
# super does not work on KDE, because fml send_key 'super';
send_key 'alt-f1';
# srsly KDE y u so slo # srsly KDE y u so slo
wait_still_screen 3; wait_still_screen 3;
type_very_safely $app; type_very_safely $app;

View File

@ -113,8 +113,22 @@ sub run {
else { else {
# on lives, we have to explicitly launch anaconda # on lives, we have to explicitly launch anaconda
if (get_var('LIVE')) { if (get_var('LIVE')) {
assert_screen ["live_start_anaconda_icon", "apps_menu_button_active"], 300; my $count = 5;
send_key "alt-f1" if match_has_tag "apps_menu_button_active"; 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, # for KDE we need to double-click after kde-settings-34.6-1,
# which is stable now. # which is stable now.
# FIXME: when F33 goes EOL, make the condition just "if kde" # 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 # do this from the overview because the desktop uses the stupid
# transparent top bar which messes with our needles # transparent top bar which messes with our needles
send_key "alt-f1"; send_key "super";
assert_screen "overview_app_grid"; assert_screen "overview_app_grid";
# check both layouts are available at the desktop; here, # check both layouts are available at the desktop; here,
# we can expect input method switching to work too # we can expect input method switching to work too
@ -33,7 +33,7 @@ sub run {
# wait a bit for input switch to complete # wait a bit for input switch to complete
sleep 3; sleep 3;
# assume we can test input from whatever 'alt-f1' opened # assume we can test input from whatever 'super' opened
type_safely "yama"; type_safely "yama";
assert_screen "desktop_yama_hiragana"; assert_screen "desktop_yama_hiragana";
send_key "spc"; send_key "spc";

View File

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

View File

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

View File

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