1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-21 13:33:08 +00:00

Allow language selection on WebUI installations.

Currently, the installation via WebUI is mostly pushing the Next button
which seems to be ok for the production which is based in the US.

This PR makes openQA to select languages when the  G-I-S runs
before Anaconda. The particular language is selected based on
the LANGUAGE variable.
This commit is contained in:
Lukas Ruzicka 2023-08-30 15:37:46 +02:00 committed by adamwill
parent d45f2add79
commit 296b43381a
8 changed files with 71 additions and 4 deletions

View File

@ -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',

View File

@ -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}) {

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 231,
"ypos": 223,
"width": 70,
"height": 23,
"type": "match"
}
],
"properties": [],
"tags": [
"install_lang_search_field"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 235,
"ypos": 330,
"width": 57,
"height": 23,
"type": "match"
}
],
"properties": [],
"tags": [
"gis_lang_english_select"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 235,
"ypos": 282,
"width": 82,
"height": 23,
"type": "match"
}
],
"properties": [],
"tags": [
"gis_lang_english_selected"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB