Rejig GNOME welcome screen/g-i-s handling for GNOME 40

In GNOME 40, the new-user mode of g-i-s is gone and we get the
welcome tour where we would previously have seen that. This
should handle that, I hope. I probably messed up somewhere.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2021-02-18 09:54:06 -08:00
parent 436e9cfdf2
commit 4489a6cb3f
2 changed files with 30 additions and 22 deletions

View File

@ -659,6 +659,19 @@ sub console_initial_setup {
type_string "c\n"; # continue
}
sub _handle_welcome_screen {
# handle the 'welcome' screen on GNOME. shared in a few places
if (check_screen "getting_started", 45) {
send_key "alt-f4";
# for GNOME 40, alt-f4 doesn't work
send_key "esc";
wait_still_screen 5;
}
else {
record_soft_failure "Welcome tour missing";
}
}
sub gnome_initial_setup {
# Handle gnome-initial-setup, with variations for the pre-login
# mode (when no user was created during install) and post-login
@ -761,18 +774,9 @@ sub gnome_initial_setup {
send_key "ret";
}
else {
# wait for the stupid 'help' screen to show and kill it
if (check_screen "getting_started", 45) {
send_key "alt-f4";
# for GNOME 40, alt-f4 doesn't work
send_key "esc";
wait_still_screen 5;
}
else {
record_soft_failure "'getting started' missing (probably BGO#790811)";
}
# don't do it again on second load
_handle_welcome_screen;
}
# don't do it again on second load
set_var("_setup_done", 1);
}

View File

@ -70,7 +70,7 @@ sub run {
send_key "ret";
}
# Handle initial-setup, for GNOME, unless START_AFTER_TEST
# For GNOME, handle initial-setup or welcome tour, unless START_AFTER_TEST
# is set in which case it will have been done already. Always
# do it if ADVISORY_OR_TASK is set, as for the update testing flow,
# START_AFTER_TEST is set but a no-op and this hasn't happened
@ -79,20 +79,24 @@ sub run {
# we might be on the INSTALL_NO_USER flow, check whether
# this happened already
unless (get_var("_setup_done")) {
my $relnum = get_release_number;
if ($relnum < 34) {
# before GNOME 40 (F34), we get a per-user version of
# gnome-initial-setup here...
gnome_initial_setup();
}
else {
# ...from GNOME 40 on, we just get a "Welcome" tour
_handle_welcome_screen;
# protect against expecting it again
set_var("_setup_done");
}
}
}
if (get_var("DESKTOP") eq 'gnome' && get_var("INSTALL_NO_USER")) {
# wait for the stupid 'help' screen to show and kill it
if (check_screen "getting_started", 45) {
send_key "alt-f4";
# for GNOME 40, alt-f4 doesn't work
send_key "esc";
wait_still_screen 5;
}
else {
record_soft_failure "'getting started' missing (probably BGO#790811)";
}
# handle welcome screen if we didn't do it above (holy flow
# control, Batman!)
_handle_welcome_screen unless (get_var("_setup_done"));
# if this was an image deployment, we also need to create
# root user now, for subsequent tests to work
if (get_var("IMAGE_DEPLOY")) {