diff --git a/lib/anacondatest.pm b/lib/anacondatest.pm index 320bc596..d26d4b92 100644 --- a/lib/anacondatest.pm +++ b/lib/anacondatest.pm @@ -142,6 +142,16 @@ sub custom_delete_part { assert_and_click "anaconda_part_delete"; } +sub switch_layout { + # switch to 'native' or 'us' keyboard layout + my ($self, $layout) = @_; + $layout //= 'us'; + # if already selected, we're good + return if (check_screen "anaconda_layout_$layout", 3); + send_key "alt-shift"; + assert_screen "anaconda_layout_$layout", 3; +} + 1; # vim: set sw=4 et: diff --git a/lib/fedorabase.pm b/lib/fedorabase.pm index 42d2a75b..f791484c 100644 --- a/lib/fedorabase.pm +++ b/lib/fedorabase.pm @@ -64,7 +64,16 @@ sub console_login { sleep 2; } elsif ($needpass and check_screen "console_password_required", 0) { - type_string "$args{password}\n"; + type_string "$args{password}"; + if (get_var("SWITCHED_LAYOUT")) { + # see _do_install_and_reboot; when layout is switched + # password is doubled to contain both US and native + # chars + $self->console_switch_layout(); + type_string "$args{password}"; + $self->console_switch_layout(); + } + send_key "ret"; $needpass = 0; # Sometimes login takes a bit of time, so add an extra sleep sleep 2; @@ -169,6 +178,14 @@ sub clone_host_resolv { assert_script_run "cat /etc/resolv.conf"; } +sub console_switch_layout { + # switcher key combo differs between layouts, for console + my $self = shift; + if (get_var("LANGUAGE", "") eq "russian") { + send_key "ctrl-shift"; + } +} + 1; # vim: set sw=4 et: diff --git a/needles/anaconda/install_destination/russian/encrypt_data_russian.json b/needles/anaconda/install_destination/russian/encrypt_data_russian.json new file mode 100644 index 00000000..40c6573e --- /dev/null +++ b/needles/anaconda/install_destination/russian/encrypt_data_russian.json @@ -0,0 +1,16 @@ +{ + "tags": [ + "LANGUAGE-russian", + "anaconda_install_destination_encrypt_data" + ], + "area": [ + { + "xpos": 20, + "ypos": 588, + "width": 155, + "height": 20, + "type": "match" + } + ], + "properties": [] +} \ No newline at end of file diff --git a/needles/anaconda/install_destination/russian/encrypt_data_russian.png b/needles/anaconda/install_destination/russian/encrypt_data_russian.png new file mode 100644 index 00000000..81007e94 Binary files /dev/null and b/needles/anaconda/install_destination/russian/encrypt_data_russian.png differ diff --git a/needles/anaconda/install_destination/russian/save_passphrase_russian.json b/needles/anaconda/install_destination/russian/save_passphrase_russian.json new file mode 100644 index 00000000..06033423 --- /dev/null +++ b/needles/anaconda/install_destination/russian/save_passphrase_russian.json @@ -0,0 +1,16 @@ +{ + "area": [ + { + "xpos": 603, + "ypos": 494, + "width": 183, + "height": 18, + "type": "match" + } + ], + "properties": [], + "tags": [ + "LANGUAGE-russian", + "anaconda_install_destination_save_passphrase" + ] +} \ No newline at end of file diff --git a/needles/anaconda/install_destination/russian/save_passphrase_russian.png b/needles/anaconda/install_destination/russian/save_passphrase_russian.png new file mode 100644 index 00000000..828bfaca Binary files /dev/null and b/needles/anaconda/install_destination/russian/save_passphrase_russian.png differ diff --git a/needles/anaconda/install_process/layout_us.json b/needles/anaconda/install_process/layout_us.json new file mode 100644 index 00000000..0eb1dca2 --- /dev/null +++ b/needles/anaconda/install_process/layout_us.json @@ -0,0 +1,14 @@ +{ + "area": [ + { + "height": 15, + "type": "match", + "width": 35, + "xpos": 685, + "ypos": 60 + } + ], + "tags": [ + "anaconda_layout_us" + ] +} diff --git a/needles/anaconda/install_process/layout_us.png b/needles/anaconda/install_process/layout_us.png new file mode 100644 index 00000000..bcf026eb Binary files /dev/null and b/needles/anaconda/install_process/layout_us.png differ diff --git a/needles/anaconda/install_process/russian/install_done_russian.json b/needles/anaconda/install_process/russian/install_done_russian.json new file mode 100644 index 00000000..c7515c47 --- /dev/null +++ b/needles/anaconda/install_process/russian/install_done_russian.json @@ -0,0 +1,24 @@ +{ + "area": [ + { + "height": 20, + "type": "match", + "width": 350, + "xpos": 670, + "ypos": 632 + }, + { + "height": 28, + "type": "match", + "width": 17, + "xpos": 1000, + "ypos": 678 + } + ], + "properties": [], + "tags": [ + "anaconda_install_done", + "ENV-DISTRI-fedora", + "LANGUAGE-russian" + ] +} diff --git a/needles/anaconda/install_process/russian/install_done_russian.png b/needles/anaconda/install_process/russian/install_done_russian.png new file mode 100644 index 00000000..9bbfe154 Binary files /dev/null and b/needles/anaconda/install_process/russian/install_done_russian.png differ diff --git a/needles/anaconda/install_process/russian/layout_native_russian.json b/needles/anaconda/install_process/russian/layout_native_russian.json new file mode 100644 index 00000000..0878edc0 --- /dev/null +++ b/needles/anaconda/install_process/russian/layout_native_russian.json @@ -0,0 +1,16 @@ +{ + "area": [ + { + "xpos": 343, + "ypos": 380, + "width": 38, + "height": 15, + "type": "match" + } + ], + "properties": [], + "tags": [ + "LANGUAGE-russian", + "anaconda_layout_native" + ] +} \ No newline at end of file diff --git a/needles/anaconda/install_process/russian/layout_native_russian.png b/needles/anaconda/install_process/russian/layout_native_russian.png new file mode 100644 index 00000000..1aaf7314 Binary files /dev/null and b/needles/anaconda/install_process/russian/layout_native_russian.png differ diff --git a/needles/anaconda/install_process/russian/root_password_screen_russian.json b/needles/anaconda/install_process/russian/root_password_screen_russian.json new file mode 100644 index 00000000..4dbb8c25 --- /dev/null +++ b/needles/anaconda/install_process/russian/root_password_screen_russian.json @@ -0,0 +1,16 @@ +{ + "area": [ + { + "xpos": 195, + "ypos": 124, + "width": 81, + "height": 17, + "type": "match" + } + ], + "properties": [], + "tags": [ + "LANGUAGE-russian", + "anaconda_install_root_password_screen" + ] +} \ No newline at end of file diff --git a/needles/anaconda/install_process/russian/root_password_screen_russian.png b/needles/anaconda/install_process/russian/root_password_screen_russian.png new file mode 100644 index 00000000..61210ab2 Binary files /dev/null and b/needles/anaconda/install_process/russian/root_password_screen_russian.png differ diff --git a/needles/anaconda/install_process/russian/user_creation_make_admin_russian.json b/needles/anaconda/install_process/russian/user_creation_make_admin_russian.json new file mode 100644 index 00000000..06fbf4a0 --- /dev/null +++ b/needles/anaconda/install_process/russian/user_creation_make_admin_russian.json @@ -0,0 +1,16 @@ +{ + "area": [ + { + "xpos": 356, + "ypos": 212, + "width": 315, + "height": 21, + "type": "match" + } + ], + "properties": [], + "tags": [ + "LANGUAGE-russian", + "anaconda_install_user_creation_make_admin" + ] +} \ No newline at end of file diff --git a/needles/anaconda/install_process/russian/user_creation_make_admin_russian.png b/needles/anaconda/install_process/russian/user_creation_make_admin_russian.png new file mode 100644 index 00000000..fcf82c3e Binary files /dev/null and b/needles/anaconda/install_process/russian/user_creation_make_admin_russian.png differ diff --git a/needles/anaconda/install_process/russian/user_creation_password_input_russian.json b/needles/anaconda/install_process/russian/user_creation_password_input_russian.json new file mode 100644 index 00000000..64a3d34f --- /dev/null +++ b/needles/anaconda/install_process/russian/user_creation_password_input_russian.json @@ -0,0 +1,16 @@ +{ + "tags": [ + "LANGUAGE-russian", + "anaconda_user_creation_password_input" + ], + "area": [ + { + "xpos": 287, + "ypos": 279, + "width": 251, + "height": 18, + "type": "match" + } + ], + "properties": [] +} \ No newline at end of file diff --git a/needles/anaconda/install_process/russian/user_creation_password_input_russian.png b/needles/anaconda/install_process/russian/user_creation_password_input_russian.png new file mode 100644 index 00000000..1f9e2140 Binary files /dev/null and b/needles/anaconda/install_process/russian/user_creation_password_input_russian.png differ diff --git a/needles/anaconda/install_process/russian/user_creation_screen_russian.json b/needles/anaconda/install_process/russian/user_creation_screen_russian.json new file mode 100644 index 00000000..b150e13f --- /dev/null +++ b/needles/anaconda/install_process/russian/user_creation_screen_russian.json @@ -0,0 +1,16 @@ +{ + "tags": [ + "LANGUAGE-russian", + "anaconda_install_user_creation_screen" + ], + "area": [ + { + "xpos": 221, + "ypos": 153, + "width": 119, + "height": 18, + "type": "match" + } + ], + "properties": [] +} \ No newline at end of file diff --git a/needles/anaconda/install_process/russian/user_creation_screen_russian.png b/needles/anaconda/install_process/russian/user_creation_screen_russian.png new file mode 100644 index 00000000..c0058905 Binary files /dev/null and b/needles/anaconda/install_process/russian/user_creation_screen_russian.png differ diff --git a/needles/anaconda/install_process/user_created_qwerty.json b/needles/anaconda/install_process/user_created_qwerty.json new file mode 100644 index 00000000..41848897 --- /dev/null +++ b/needles/anaconda/install_process/user_created_qwerty.json @@ -0,0 +1,16 @@ +{ + "properties": [], + "area": [ + { + "xpos": 911, + "ypos": 186, + "width": 53, + "height": 17, + "type": "match" + } + ], + "tags": [ + "LANGUAGE-russian", + "anaconda_install_user_created" + ] +} \ No newline at end of file diff --git a/needles/anaconda/install_process/user_created_qwerty.png b/needles/anaconda/install_process/user_created_qwerty.png new file mode 100644 index 00000000..f88e3b66 Binary files /dev/null and b/needles/anaconda/install_process/user_created_qwerty.png differ diff --git a/needles/anaconda/lang_select/install_lang_english_filtered-cantarell22.json b/needles/anaconda/lang_select/install_lang_english_filtered-cantarell22.json index 78ceea74..77d049bc 100644 --- a/needles/anaconda/lang_select/install_lang_english_filtered-cantarell22.json +++ b/needles/anaconda/lang_select/install_lang_english_filtered-cantarell22.json @@ -17,6 +17,7 @@ ], "properties": [], "tags": [ - "anaconda_select_install_lang_filtered" + "anaconda_select_install_lang_filtered", + "LANGUAGE-english" ] -} \ No newline at end of file +} diff --git a/needles/anaconda/lang_select/russian/install_lang_continue_russian.json b/needles/anaconda/lang_select/russian/install_lang_continue_russian.json new file mode 100644 index 00000000..11185add --- /dev/null +++ b/needles/anaconda/lang_select/russian/install_lang_continue_russian.json @@ -0,0 +1,16 @@ +{ + "properties": [], + "area": [ + { + "xpos": 915, + "ypos": 733, + "width": 91, + "height": 23, + "type": "match" + } + ], + "tags": [ + "LANGUAGE-russian", + "anaconda_select_install_lang_continue" + ] +} \ No newline at end of file diff --git a/needles/anaconda/lang_select/russian/install_lang_continue_russian.png b/needles/anaconda/lang_select/russian/install_lang_continue_russian.png new file mode 100644 index 00000000..fd834bf5 Binary files /dev/null and b/needles/anaconda/lang_select/russian/install_lang_continue_russian.png differ diff --git a/needles/anaconda/lang_select/russian/install_lang_russian_filtered.json b/needles/anaconda/lang_select/russian/install_lang_russian_filtered.json new file mode 100644 index 00000000..59f14c4f --- /dev/null +++ b/needles/anaconda/lang_select/russian/install_lang_russian_filtered.json @@ -0,0 +1,23 @@ +{ + "area": [ + { + "height": 39, + "type": "match", + "width": 62, + "xpos": 220, + "ypos": 186 + }, + { + "height": 33, + "type": "match", + "width": 71, + "xpos": 482, + "ypos": 189 + } + ], + "properties": [], + "tags": [ + "anaconda_select_install_lang_filtered", + "LANGUAGE-russian" + ] +} diff --git a/needles/anaconda/lang_select/russian/install_lang_russian_filtered.png b/needles/anaconda/lang_select/russian/install_lang_russian_filtered.png new file mode 100644 index 00000000..57d40b6b Binary files /dev/null and b/needles/anaconda/lang_select/russian/install_lang_russian_filtered.png differ diff --git a/needles/anaconda/lang_select/russian/install_lang_russian_selected.json b/needles/anaconda/lang_select/russian/install_lang_russian_selected.json new file mode 100644 index 00000000..a354a5c0 --- /dev/null +++ b/needles/anaconda/lang_select/russian/install_lang_russian_selected.json @@ -0,0 +1,17 @@ +{ + "properties": [], + "area": [ + { + "xpos": 605, + "ypos": 200, + "width": 123, + "height": 20, + "type": "match" + } + ], + "tags": [ + "LANGUAGE-russian", + "anaconda_select_install_lang_filtered", + "anaconda_select_install_lang_selected" + ] +} \ No newline at end of file diff --git a/needles/anaconda/lang_select/russian/install_lang_russian_selected.png b/needles/anaconda/lang_select/russian/install_lang_russian_selected.png new file mode 100644 index 00000000..fd834bf5 Binary files /dev/null and b/needles/anaconda/lang_select/russian/install_lang_russian_selected.png differ diff --git a/needles/anaconda/main_hub/russian/begin_installation_russian.json b/needles/anaconda/main_hub/russian/begin_installation_russian.json new file mode 100644 index 00000000..4fc010e7 --- /dev/null +++ b/needles/anaconda/main_hub/russian/begin_installation_russian.json @@ -0,0 +1,16 @@ +{ + "area": [ + { + "xpos": 881, + "ypos": 704, + "width": 122, + "height": 24, + "type": "match" + } + ], + "properties": [], + "tags": [ + "LANGUAGE-russian", + "anaconda_main_hub_begin_installation" + ] +} \ No newline at end of file diff --git a/needles/anaconda/main_hub/russian/begin_installation_russian.png b/needles/anaconda/main_hub/russian/begin_installation_russian.png new file mode 100644 index 00000000..173d2e45 Binary files /dev/null and b/needles/anaconda/main_hub/russian/begin_installation_russian.png differ diff --git a/needles/anaconda/package_selection/russian/minimal_highlighted_russian.json b/needles/anaconda/package_selection/russian/minimal_highlighted_russian.json new file mode 100644 index 00000000..9773e4e1 --- /dev/null +++ b/needles/anaconda/package_selection/russian/minimal_highlighted_russian.json @@ -0,0 +1,16 @@ +{ + "properties": [], + "area": [ + { + "xpos": 49, + "ypos": 141, + "width": 157, + "height": 15, + "type": "match" + } + ], + "tags": [ + "LANGUAGE-russian", + "anaconda_minimal_highlighted" + ] +} \ No newline at end of file diff --git a/needles/anaconda/package_selection/russian/minimal_highlighted_russian.png b/needles/anaconda/package_selection/russian/minimal_highlighted_russian.png new file mode 100644 index 00000000..6aaf0680 Binary files /dev/null and b/needles/anaconda/package_selection/russian/minimal_highlighted_russian.png differ diff --git a/needles/anaconda/package_selection/russian/minimal_selected_russian.json b/needles/anaconda/package_selection/russian/minimal_selected_russian.json new file mode 100644 index 00000000..68ea3d41 --- /dev/null +++ b/needles/anaconda/package_selection/russian/minimal_selected_russian.json @@ -0,0 +1,16 @@ +{ + "area": [ + { + "xpos": 31, + "ypos": 141, + "width": 173, + "height": 15, + "type": "match" + } + ], + "properties": [], + "tags": [ + "LANGUAGE-russian", + "anaconda_minimal_selected" + ] +} \ No newline at end of file diff --git a/needles/anaconda/package_selection/russian/minimal_selected_russian.png b/needles/anaconda/package_selection/russian/minimal_selected_russian.png new file mode 100644 index 00000000..6aaf0680 Binary files /dev/null and b/needles/anaconda/package_selection/russian/minimal_selected_russian.png differ diff --git a/needles/anaconda/universal/russian/rawhide_accept_fate_russian.json b/needles/anaconda/universal/russian/rawhide_accept_fate_russian.json new file mode 100644 index 00000000..0525b9dc --- /dev/null +++ b/needles/anaconda/universal/russian/rawhide_accept_fate_russian.json @@ -0,0 +1,16 @@ +{ + "properties": [], + "area": [ + { + "xpos": 570, + "ypos": 449, + "width": 212, + "height": 17, + "type": "match" + } + ], + "tags": [ + "LANGUAGE-russian", + "anaconda_rawhide_accept_fate" + ] +} \ No newline at end of file diff --git a/needles/anaconda/universal/russian/rawhide_accept_fate_russian.png b/needles/anaconda/universal/russian/rawhide_accept_fate_russian.png new file mode 100644 index 00000000..0d0a608d Binary files /dev/null and b/needles/anaconda/universal/russian/rawhide_accept_fate_russian.png differ diff --git a/needles/anaconda/universal/russian/spoke_done_russian.json b/needles/anaconda/universal/russian/spoke_done_russian.json new file mode 100644 index 00000000..fc2dc34b --- /dev/null +++ b/needles/anaconda/universal/russian/spoke_done_russian.json @@ -0,0 +1,16 @@ +{ + "area": [ + { + "xpos": 27, + "ypos": 52, + "width": 56, + "height": 21, + "type": "match" + } + ], + "properties": [], + "tags": [ + "LANGUAGE-russian", + "anaconda_spoke_done" + ] +} \ No newline at end of file diff --git a/needles/anaconda/universal/russian/spoke_done_russian.png b/needles/anaconda/universal/russian/spoke_done_russian.png new file mode 100644 index 00000000..6aaf0680 Binary files /dev/null and b/needles/anaconda/universal/russian/spoke_done_russian.png differ diff --git a/templates b/templates index d9fc1d3a..e171c425 100755 --- a/templates +++ b/templates @@ -787,6 +787,17 @@ }, test_suite => { name => "install_european_language" }, }, + { + machine => { name => "64bit" }, + prio => 40, + product => { + arch => "x86_64", + distri => "fedora", + flavor => "universal", + version => "*", + }, + test_suite => { name => "install_cyrillic_language" }, + }, { machine => { name => "64bit" }, prio => 40, @@ -1500,6 +1511,16 @@ { key => "ENCRYPT_PASSWORD", value => "weakpassword" }, ], }, + { + name => "install_cyrillic_language", + settings => [ + { key => "LANGUAGE", value => "russian" }, + { key => "SWITCHED_LAYOUT", value => "1" }, + { key => "USER_LOGIN", value => "qwerty" }, + { key => "ROOT_PASSWORD", value => "weakpassword" }, + { key => "ENCRYPT_PASSWORD", value => "weakpassword" }, + ], + }, { name => "install_xfs", settings => [ diff --git a/tests/_do_install_and_reboot.pm b/tests/_do_install_and_reboot.pm index 1256b55f..a328c8d4 100644 --- a/tests/_do_install_and_reboot.pm +++ b/tests/_do_install_and_reboot.pm @@ -3,6 +3,7 @@ use strict; use testapi; sub run { + my $self = shift; # Anaconda hub assert_screen "anaconda_main_hub", 300; # @@ -17,6 +18,7 @@ sub run { my $root_password = get_var("ROOT_PASSWORD") || "weakpassword"; assert_and_click "anaconda_install_root_password"; assert_screen "anaconda_install_root_password_screen"; + $self->switch_layout("us") if (get_var("SWITCHED_LAYOUT")); type_string $root_password; send_key "tab"; type_string $root_password; @@ -33,9 +35,27 @@ sub run { assert_screen "anaconda_install_user_creation_screen"; type_string $user_login; assert_and_click "anaconda_user_creation_password_input"; - type_string $user_password; + if (get_var("SWITCHED_LAYOUT")) { + # we double the password, the second time using the native + # layout, so the password has both US and native characters + $self->switch_layout("us"); + type_string $user_password; + $self->switch_layout("native"); + type_string $user_password; + } + else { + type_string $user_password; + } send_key "tab"; - type_string $user_password; + if (get_var("SWITCHED_LAYOUT")) { + $self->switch_layout("us"); + type_string $user_password; + $self->switch_layout("native"); + type_string $user_password; + } + else { + type_string $user_password; + } assert_and_click "anaconda_install_user_creation_make_admin"; assert_and_click "anaconda_spoke_done"; # handle 'weak password' due to dictionary error: WORKAROUND diff --git a/tests/disk_guided_encrypted.pm b/tests/disk_guided_encrypted.pm index a6578aac..d7c6ecd9 100644 --- a/tests/disk_guided_encrypted.pm +++ b/tests/disk_guided_encrypted.pm @@ -14,9 +14,12 @@ sub run { # type password for disk encryption wait_idle 5; + $self->switch_layout("us"); type_string get_var("ENCRYPT_PASSWORD"); send_key "tab"; type_string get_var("ENCRYPT_PASSWORD"); + # work around RHBZ #1333984 + $self->switch_layout("native"); assert_and_click "anaconda_install_destination_save_passphrase";