Fix the welcome screen
Some checks failed
CI via Tox and perl / tox (pull_request) Failing after 2m0s
CI via Tox and perl / perl (pull_request) Failing after 4m8s
CI via Tox and perl / checkwiki (pull_request) Successful in 37s

This commit is contained in:
Lukáš Růžička 2026-04-27 14:21:21 +02:00
commit 6b5ba6e570

View file

@ -29,11 +29,17 @@ sub get_screen {
}
sub handle_welcome {
# Select a non-default language explicitely.
type_string('Czech');
wait_still_screen(2);
assert_and_click('gis_lang_czech_select');
assert_and_click('next_button');
my $welcome_type = shift;
if ($welcome_type eq "langselect") {
# Select a non-default language explicitely.
type_string('Czech');
wait_still_screen(2);
assert_and_click('gis_lang_czech_select');
assert_and_click('next_button');
}
else {
assert_and_click('gis_button_start_setup');
}
}
sub handle_keyboard {
@ -107,6 +113,7 @@ sub run {
my $iterations = 0;
my %visited_screens;
my @required_screens = qw(
welcome
privacy
timezone
software
@ -123,7 +130,17 @@ sub run {
last if $current_screen eq 'final';
if ($current_screen eq 'welcome') {
handle_welcome();
# Welcome can have two types, either it is a language
# setting screen, or it is just a real welcom page.
# Check if we see the "Start Setup" button and in
# that case, click on it, otherwise do the language
# selection.
if (check_screen('gis_button_start_setup', timeout => 10)) {
handle_welcome('welcome');
}
else {
handle_welcome('langselect');
}
}
elsif ($current_screen eq 'keyboard') {
handle_keyboard();