diff --git a/check-needles.py b/check-needles.py index f6e270e4..a1222274 100755 --- a/check-needles.py +++ b/check-needles.py @@ -204,6 +204,10 @@ for typus in ("swap", "ext4", "xfs", "linuxroot"): testtags.append(f"disks_parttype_changed_{typus}") # variable-y in custom_change_device but we only have one value testtags.append("anaconda_part_device_sda") +# For language needles +for lang in ("english", "russian", "chinese", "arabic", "japanese", "turkish", "french"): + testtags.append(f"gis_lang_{lang}_select") + testtags.append(f"gis_lang_{lang}_selected") # for Anaconda help related needles. testtags.extend(f"anaconda_help_{fsys}" for fsys in ('install_destination', 'installation_progress', 'keyboard_layout', 'language_support', 'network_host_name', diff --git a/lib/utils.pm b/lib/utils.pm index d8e9f185..597a4579 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -790,11 +790,26 @@ sub gnome_initial_setup { # to the next screen between clicks mouse_set(100, 100); if ($next eq 'language') { + my $lang = get_var("LANGUAGE") // "english"; # only accept start_setup one time, to avoid matching # on it during transition to next screen. also accept - # next_button as in live and existing user modes, first - # screen has that not start_setup - wait_screen_change { assert_and_click ["next_button", "start_setup"]; }; + # next_button as in per-user mode, first screen has that + # not start_setup + assert_screen ["next_button", "start_setup"]; + if (match_has_tag("start_setup") || check_screen("gis_lang_${lang}_selected")) { + # we're at the 'welcome' version of the screen, or we're + # at the 'language' version and the language we want is + # selected + wait_screen_change { click_lastmatch(); }; + } + else { + # we're at the language version and the language we want isn't + # selected + assert_and_click("install_lang_search_field"); + type_very_safely($lang); + assert_and_click("gis_lang_${lang}_select"); + wait_screen_change { assert_and_click("next_button"); }; + } } elsif ($next eq 'timezone') { assert_screen ["next_button", "next_button_inactive"]; @@ -809,7 +824,10 @@ sub gnome_initial_setup { wait_screen_change { assert_and_click "next_button"; }; } else { - wait_screen_change { assert_and_click "next_button"; }; + # Sometimes, the previous version was expection the next button, although + # the wizard had proceeded to the final screen with no such button on it. + # Therefore, we also try to assert the installation button to start Anaconda. + wait_screen_change { assert_and_click ["next_button"]; }; } } unless (get_var("VNC_CLIENT") || $args{live}) { diff --git a/needles/anaconda/webui/install_lang_search_field.json b/needles/anaconda/webui/install_lang_search_field.json new file mode 100644 index 00000000..31122a88 --- /dev/null +++ b/needles/anaconda/webui/install_lang_search_field.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 231, + "ypos": 223, + "width": 70, + "height": 23, + "type": "match" + } + ], + "properties": [], + "tags": [ + "install_lang_search_field" + ] +} \ No newline at end of file diff --git a/needles/anaconda/webui/install_lang_search_field.png b/needles/anaconda/webui/install_lang_search_field.png new file mode 100644 index 00000000..f558e401 Binary files /dev/null and b/needles/anaconda/webui/install_lang_search_field.png differ diff --git a/needles/gnome/gis_lang_english_select.json b/needles/gnome/gis_lang_english_select.json new file mode 100644 index 00000000..ef9530db --- /dev/null +++ b/needles/gnome/gis_lang_english_select.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 235, + "ypos": 330, + "width": 57, + "height": 23, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gis_lang_english_select" + ] +} \ No newline at end of file diff --git a/needles/gnome/gis_lang_english_select.png b/needles/gnome/gis_lang_english_select.png new file mode 100644 index 00000000..75c0f8c6 Binary files /dev/null and b/needles/gnome/gis_lang_english_select.png differ diff --git a/needles/gnome/gis_lang_english_selected.json b/needles/gnome/gis_lang_english_selected.json new file mode 100644 index 00000000..3d85442b --- /dev/null +++ b/needles/gnome/gis_lang_english_selected.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 235, + "ypos": 282, + "width": 82, + "height": 23, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gis_lang_english_selected" + ] +} \ No newline at end of file diff --git a/needles/gnome/gis_lang_english_selected.png b/needles/gnome/gis_lang_english_selected.png new file mode 100644 index 00000000..195c97ba Binary files /dev/null and b/needles/gnome/gis_lang_english_selected.png differ