diff --git a/lib/utils.pm b/lib/utils.pm index 6f5b528d..75242829 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -378,7 +378,7 @@ sub console_loadkeys_us { elsif (get_var('LANGUAGE') eq 'japanese' || get_var('LANGUAGE') eq 'turkish') { script_run "loadkeys us", 0; } - elsif (get_var('LANGUAGE') eq 'czech' || get_var('LAYOUT') eq 'czech')) { + elsif (get_var('LANGUAGE') eq 'czech' || get_var('LAYOUT') eq 'czech') { script_run('loadkezs us', 0); } wait_still_screen(3); diff --git a/needles/gnome/apps/gnome-initial-setup/gis_button_enable_thirdparty-20260427.json b/needles/gnome/apps/gnome-initial-setup/gis_button_enable_thirdparty-20260427.json new file mode 100644 index 00000000..5405aac1 --- /dev/null +++ b/needles/gnome/apps/gnome-initial-setup/gis_button_enable_thirdparty-20260427.json @@ -0,0 +1,19 @@ +{ + "area": [ + { + "width": 234, + "type": "match", + "height": 21, + "ypos": 291, + "xpos": 395, + "click_point": { + "xpos": 117, + "ypos": 10.5 + } + } + ], + "properties": [], + "tags": [ + "gis_button_enable_thirdparty" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gnome-initial-setup/gis_button_enable_thirdparty-20260427.png b/needles/gnome/apps/gnome-initial-setup/gis_button_enable_thirdparty-20260427.png new file mode 100644 index 00000000..52941452 Binary files /dev/null and b/needles/gnome/apps/gnome-initial-setup/gis_button_enable_thirdparty-20260427.png differ diff --git a/needles/gnome/apps/gnome-initial-setup/gis_button_start_fedora-20260427.json b/needles/gnome/apps/gnome-initial-setup/gis_button_start_fedora-20260427.json new file mode 100644 index 00000000..e1fa9198 --- /dev/null +++ b/needles/gnome/apps/gnome-initial-setup/gis_button_start_fedora-20260427.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 423, + "ypos": 547, + "width": 182, + "type": "match", + "height": 20 + } + ], + "properties": [], + "tags": [ + "gis_button_start_fedora" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gnome-initial-setup/gis_button_start_fedora-20260427.png b/needles/gnome/apps/gnome-initial-setup/gis_button_start_fedora-20260427.png new file mode 100644 index 00000000..6f280361 Binary files /dev/null and b/needles/gnome/apps/gnome-initial-setup/gis_button_start_fedora-20260427.png differ diff --git a/needles/gnome/apps/gnome-initial-setup/gis_button_start_setup-20260427.json b/needles/gnome/apps/gnome-initial-setup/gis_button_start_setup-20260427.json new file mode 100644 index 00000000..63d95bfe --- /dev/null +++ b/needles/gnome/apps/gnome-initial-setup/gis_button_start_setup-20260427.json @@ -0,0 +1,19 @@ +{ + "area": [ + { + "xpos": 460, + "ypos": 667, + "width": 106, + "height": 27, + "type": "match", + "click_point": { + "xpos": 53, + "ypos": 13.5 + } + } + ], + "properties": [], + "tags": [ + "gis_button_start_setup" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gnome-initial-setup/gis_button_start_setup-20260427.png b/needles/gnome/apps/gnome-initial-setup/gis_button_start_setup-20260427.png new file mode 100644 index 00000000..475c9413 Binary files /dev/null and b/needles/gnome/apps/gnome-initial-setup/gis_button_start_setup-20260427.png differ diff --git a/needles/gnome/apps/gnome-initial-setup/gis_field_confirm_password-20260427.json b/needles/gnome/apps/gnome-initial-setup/gis_field_confirm_password-20260427.json new file mode 100644 index 00000000..a88d0c55 --- /dev/null +++ b/needles/gnome/apps/gnome-initial-setup/gis_field_confirm_password-20260427.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "type": "match", + "height": 26, + "width": 136, + "xpos": 235, + "ypos": 365 + } + ], + "properties": [], + "tags": [ + "gis_field_confirm_password" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gnome-initial-setup/gis_field_confirm_password-20260427.png b/needles/gnome/apps/gnome-initial-setup/gis_field_confirm_password-20260427.png new file mode 100644 index 00000000..dd574efc Binary files /dev/null and b/needles/gnome/apps/gnome-initial-setup/gis_field_confirm_password-20260427.png differ diff --git a/needles/gnome/apps/gnome-initial-setup/gis_geoservice_enabled-20260427.json b/needles/gnome/apps/gnome-initial-setup/gis_geoservice_enabled-20260427.json new file mode 100644 index 00000000..ba34fbaa --- /dev/null +++ b/needles/gnome/apps/gnome-initial-setup/gis_geoservice_enabled-20260427.json @@ -0,0 +1,19 @@ +{ + "area": [ + { + "xpos": 229, + "ypos": 215, + "click_point": { + "ypos": 18.5, + "xpos": 281 + }, + "width": 562, + "height": 37, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gis_geoservice_enabled" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gnome-initial-setup/gis_geoservice_enabled-20260427.png b/needles/gnome/apps/gnome-initial-setup/gis_geoservice_enabled-20260427.png new file mode 100644 index 00000000..e68da255 Binary files /dev/null and b/needles/gnome/apps/gnome-initial-setup/gis_geoservice_enabled-20260427.png differ diff --git a/needles/gnome/apps/gnome-initial-setup/gis_radio_reporting_disable-20260427.json b/needles/gnome/apps/gnome-initial-setup/gis_radio_reporting_disable-20260427.json new file mode 100644 index 00000000..04121beb --- /dev/null +++ b/needles/gnome/apps/gnome-initial-setup/gis_radio_reporting_disable-20260427.json @@ -0,0 +1,19 @@ +{ + "area": [ + { + "width": 559, + "type": "match", + "height": 36, + "xpos": 233, + "ypos": 337, + "click_point": { + "xpos": 524, + "ypos": 13 + } + } + ], + "properties": [], + "tags": [ + "gis_radio_reporting_disable" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gnome-initial-setup/gis_radio_reporting_disable-20260427.png b/needles/gnome/apps/gnome-initial-setup/gis_radio_reporting_disable-20260427.png new file mode 100644 index 00000000..e68da255 Binary files /dev/null and b/needles/gnome/apps/gnome-initial-setup/gis_radio_reporting_disable-20260427.png differ diff --git a/needles/gnome/apps/gnome-initial-setup/gis_reporting_enabled-20260427.json b/needles/gnome/apps/gnome-initial-setup/gis_reporting_enabled-20260427.json new file mode 100644 index 00000000..1ffcec91 --- /dev/null +++ b/needles/gnome/apps/gnome-initial-setup/gis_reporting_enabled-20260427.json @@ -0,0 +1,19 @@ +{ + "area": [ + { + "width": 558, + "height": 31, + "type": "match", + "ypos": 338, + "xpos": 234, + "click_point": { + "xpos": 523, + "ypos": 13.5 + } + } + ], + "properties": [], + "tags": [ + "gis_reporting_enabled" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gnome-initial-setup/gis_reporting_enabled-20260427.png b/needles/gnome/apps/gnome-initial-setup/gis_reporting_enabled-20260427.png new file mode 100644 index 00000000..e68da255 Binary files /dev/null and b/needles/gnome/apps/gnome-initial-setup/gis_reporting_enabled-20260427.png differ diff --git a/needles/gnome/apps/gnome-initial-setup/gis_screen_credentials-20260427.json b/needles/gnome/apps/gnome-initial-setup/gis_screen_credentials-20260427.json new file mode 100644 index 00000000..dcc84fd7 --- /dev/null +++ b/needles/gnome/apps/gnome-initial-setup/gis_screen_credentials-20260427.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "type": "match", + "height": 22, + "width": 80, + "xpos": 471, + "ypos": 45 + } + ], + "properties": [], + "tags": [ + "gis_screen_credentials" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gnome-initial-setup/gis_screen_credentials-20260427.png b/needles/gnome/apps/gnome-initial-setup/gis_screen_credentials-20260427.png new file mode 100644 index 00000000..6ccebca9 Binary files /dev/null and b/needles/gnome/apps/gnome-initial-setup/gis_screen_credentials-20260427.png differ diff --git a/needles/gnome/apps/gnome-initial-setup/gis_screen_password-20260427.json b/needles/gnome/apps/gnome-initial-setup/gis_screen_password-20260427.json new file mode 100644 index 00000000..a40b4c0e --- /dev/null +++ b/needles/gnome/apps/gnome-initial-setup/gis_screen_password-20260427.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "ypos": 43, + "xpos": 474, + "type": "match", + "height": 21, + "width": 77 + } + ], + "properties": [], + "tags": [ + "gis_screen_password" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gnome-initial-setup/gis_screen_password-20260427.png b/needles/gnome/apps/gnome-initial-setup/gis_screen_password-20260427.png new file mode 100644 index 00000000..b0ee51f0 Binary files /dev/null and b/needles/gnome/apps/gnome-initial-setup/gis_screen_password-20260427.png differ diff --git a/needles/gnome/apps/gnome-initial-setup/gis_screen_privacy-20260427.json b/needles/gnome/apps/gnome-initial-setup/gis_screen_privacy-20260427.json new file mode 100644 index 00000000..3566ee9c --- /dev/null +++ b/needles/gnome/apps/gnome-initial-setup/gis_screen_privacy-20260427.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "width": 73, + "height": 24, + "type": "match", + "ypos": 44, + "xpos": 475 + } + ], + "properties": [], + "tags": [ + "gis_screen_privacy" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gnome-initial-setup/gis_screen_privacy-20260427.png b/needles/gnome/apps/gnome-initial-setup/gis_screen_privacy-20260427.png new file mode 100644 index 00000000..e68da255 Binary files /dev/null and b/needles/gnome/apps/gnome-initial-setup/gis_screen_privacy-20260427.png differ diff --git a/needles/gnome/apps/gnome-initial-setup/gis_screen_software-20260427.json b/needles/gnome/apps/gnome-initial-setup/gis_screen_software-20260427.json new file mode 100644 index 00000000..e47c1c8b --- /dev/null +++ b/needles/gnome/apps/gnome-initial-setup/gis_screen_software-20260427.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "ypos": 44, + "xpos": 422, + "height": 25, + "type": "match", + "width": 181 + } + ], + "properties": [], + "tags": [ + "gis_screen_software" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gnome-initial-setup/gis_screen_software-20260427.png b/needles/gnome/apps/gnome-initial-setup/gis_screen_software-20260427.png new file mode 100644 index 00000000..52941452 Binary files /dev/null and b/needles/gnome/apps/gnome-initial-setup/gis_screen_software-20260427.png differ diff --git a/needles/gnome/apps/gnome-initial-setup/gis_screen_timezone-20260427.json b/needles/gnome/apps/gnome-initial-setup/gis_screen_timezone-20260427.json new file mode 100644 index 00000000..b2fc1400 --- /dev/null +++ b/needles/gnome/apps/gnome-initial-setup/gis_screen_timezone-20260427.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "width": 111, + "height": 25, + "type": "match", + "xpos": 459, + "ypos": 44 + } + ], + "properties": [], + "tags": [ + "gis_screen_timezone" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gnome-initial-setup/gis_screen_timezone-20260427.png b/needles/gnome/apps/gnome-initial-setup/gis_screen_timezone-20260427.png new file mode 100644 index 00000000..5448923b Binary files /dev/null and b/needles/gnome/apps/gnome-initial-setup/gis_screen_timezone-20260427.png differ diff --git a/needles/gnome/apps/gnome-initial-setup/gis_screen_welcome-real-20260427.json b/needles/gnome/apps/gnome-initial-setup/gis_screen_welcome-real-20260427.json new file mode 100644 index 00000000..d04f556b --- /dev/null +++ b/needles/gnome/apps/gnome-initial-setup/gis_screen_welcome-real-20260427.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 240, + "ypos": 507, + "width": 251, + "height": 25, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gis_screen_welcome" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gnome-initial-setup/gis_screen_welcome-real-20260427.png b/needles/gnome/apps/gnome-initial-setup/gis_screen_welcome-real-20260427.png new file mode 100644 index 00000000..475c9413 Binary files /dev/null and b/needles/gnome/apps/gnome-initial-setup/gis_screen_welcome-real-20260427.png differ diff --git a/tests/applications/gnome-initial-setup/gnome_initial_setup.pm b/tests/applications/gnome-initial-setup/gnome_initial_setup.pm index 4f327150..44134ce7 100644 --- a/tests/applications/gnome-initial-setup/gnome_initial_setup.pm +++ b/tests/applications/gnome-initial-setup/gnome_initial_setup.pm @@ -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 { @@ -102,18 +108,39 @@ sub run { assert_screen('gis_screen_welcome', timeout => 120); - # Keep running through screens until we reach the final screen + # Keep running through screens until we reach the final screen. + # Also track which screens were visited already. my $iterations = 0; + my %visited_screens; + my @required_screens = qw( + welcome + privacy + timezone + software + credentials + password + ); while (1) { die("GNOME Initial Setup appears stuck") if ++$iterations > 20; my $current_screen = get_screen(); + $visited_screens{$current_screen} = 1; record_info("GNOME Initial Setup", "Testing screen: $current_screen"); 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(); @@ -137,6 +164,10 @@ sub run { wait_still_screen(2); } + for my $screen (@required_screens) { + die("GNOME Initial Setup skipped this required screen: $screen") unless $visited_screens{$screen}; + } + # When we have reached the final screen assert_and_click("gis_button_start_fedora"); # When we have reached the system, dismiss the tour diff --git a/tests/applications/gnome-initial-setup/gnome_initial_setup_post.pm b/tests/applications/gnome-initial-setup/gnome_initial_setup_post.pm index c06f41df..4bc6b015 100644 --- a/tests/applications/gnome-initial-setup/gnome_initial_setup_post.pm +++ b/tests/applications/gnome-initial-setup/gnome_initial_setup_post.pm @@ -45,18 +45,26 @@ sub run { my $user = get_var("TESTLOGIN", "rhood"); my $password = get_var("TESTPASSWORD", "nottingham"); + my $locale_check = 0; + # Switch to the serial console. To run commands successfully, # we need to load english keyboard layout. Otherwise, we cannot # run commands correctly. Note, that the loadkeys command must # be presented in the foreign layout. $self->root_console(tty => 3); - console_loadkeys_us(); assert_script_run("chmod 666 /dev/${serialdev}"); - # Check that system locale are set to Czech (cs_CZ.UTF-8) - assert_script_run("grep -x 'LANG=cs_CZ.UTF-8' /etc/locale.conf"); - assert_script_run("localectl status | grep -E 'System Locale:.*LANG=cs_CZ\.UTF-8'"); - assert_script_run('localectl status | grep -E "VC Keymap: cz"'); + # If locale_check is off, only record info and skip checking. + if ($locale_check == 0) { + record_info("Lang settings", "Language and keyboard layout checks are switched off!"); + } + else { + console_loadkeys_us(); + # Check that system locale are set to Czech (cs_CZ.UTF-8) + assert_script_run("grep -x 'LANG=cs_CZ.UTF-8' /etc/locale.conf"); + assert_script_run("localectl status | grep -E 'System Locale:.*LANG=cs_CZ\.UTF-8'"); + assert_script_run('localectl status | grep -E "VC Keymap: cz"'); + } # Check that the time zone has been set to Bratislave, Europe assert_cmd_output_eq(q{timedatectl show -p Timezone --value}, 'Europe/Bratislava'); @@ -80,15 +88,23 @@ sub run { 'true' ); - # Check that keyboard layout and the locales are correct in user space - assert_as_user_matches($user, - q{gsettings get org.gnome.desktop.input-sources sources}, - qr/\('xkb',\s*'cz'\)/ - ); - assert_as_user_matches($user, - q{locale}, - qr/^LANG=cs_CZ\.UTF-8$/m - ); + # Do not check for keyboard layout and locales because + # this type of setting is currently disabled in G-I-S. + if ($locale_check == 0) { + record_info("Lang settings", "Language and keyboard layout checks are switched off!"); + } + else { + # Check that keyboard layout and the locales are correct in user space + assert_as_user_matches($user, + q{gsettings get org.gnome.desktop.input-sources sources}, + qr/\('xkb',\s*'cz'\)/ + ); + assert_as_user_matches($user, + q{locale}, + qr/^LANG=cs_CZ\.UTF-8$/m + ); + } + # Check that automatic reporting is disabled. assert_as_user_eq($user,