add Russian install test

Summary:
Requires new needles and test suite and job template, plus a
few tweaks to handle 'switched' keyboard layouts (so we use the
switched layout in the username and password).

Test Plan:
Run the test and see that it...fails. But that's OK!
It's a genuine bug: RHBZ #1333998 . At least make sure it gets
to that point and no other tests have broken and all the needles
look sane.

Reviewers: garretraziel

Reviewed By: garretraziel

Subscribers: tflink

Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D846
This commit is contained in:
Adam Williamson 2016-05-20 07:52:55 -07:00
parent 6dcb20e022
commit a4f3267534
42 changed files with 379 additions and 5 deletions

View File

@ -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:

View File

@ -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:

View File

@ -0,0 +1,16 @@
{
"tags": [
"LANGUAGE-russian",
"anaconda_install_destination_encrypt_data"
],
"area": [
{
"xpos": 20,
"ypos": 588,
"width": 155,
"height": 20,
"type": "match"
}
],
"properties": []
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

View File

@ -0,0 +1,16 @@
{
"area": [
{
"xpos": 603,
"ypos": 494,
"width": 183,
"height": 18,
"type": "match"
}
],
"properties": [],
"tags": [
"LANGUAGE-russian",
"anaconda_install_destination_save_passphrase"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

View File

@ -0,0 +1,14 @@
{
"area": [
{
"height": 15,
"type": "match",
"width": 35,
"xpos": 685,
"ypos": 60
}
],
"tags": [
"anaconda_layout_us"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

View File

@ -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"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

View File

@ -0,0 +1,16 @@
{
"area": [
{
"xpos": 343,
"ypos": 380,
"width": 38,
"height": 15,
"type": "match"
}
],
"properties": [],
"tags": [
"LANGUAGE-russian",
"anaconda_layout_native"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

View File

@ -0,0 +1,16 @@
{
"area": [
{
"xpos": 195,
"ypos": 124,
"width": 81,
"height": 17,
"type": "match"
}
],
"properties": [],
"tags": [
"LANGUAGE-russian",
"anaconda_install_root_password_screen"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -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"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

View File

@ -0,0 +1,16 @@
{
"tags": [
"LANGUAGE-russian",
"anaconda_user_creation_password_input"
],
"area": [
{
"xpos": 287,
"ypos": 279,
"width": 251,
"height": 18,
"type": "match"
}
],
"properties": []
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@ -0,0 +1,16 @@
{
"tags": [
"LANGUAGE-russian",
"anaconda_install_user_creation_screen"
],
"area": [
{
"xpos": 221,
"ypos": 153,
"width": 119,
"height": 18,
"type": "match"
}
],
"properties": []
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

View File

@ -0,0 +1,16 @@
{
"properties": [],
"area": [
{
"xpos": 911,
"ypos": 186,
"width": 53,
"height": 17,
"type": "match"
}
],
"tags": [
"LANGUAGE-russian",
"anaconda_install_user_created"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

View File

@ -17,6 +17,7 @@
],
"properties": [],
"tags": [
"anaconda_select_install_lang_filtered"
"anaconda_select_install_lang_filtered",
"LANGUAGE-english"
]
}
}

View File

@ -0,0 +1,16 @@
{
"properties": [],
"area": [
{
"xpos": 915,
"ypos": 733,
"width": 91,
"height": 23,
"type": "match"
}
],
"tags": [
"LANGUAGE-russian",
"anaconda_select_install_lang_continue"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

View File

@ -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"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View File

@ -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"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

View File

@ -0,0 +1,16 @@
{
"area": [
{
"xpos": 881,
"ypos": 704,
"width": 122,
"height": 24,
"type": "match"
}
],
"properties": [],
"tags": [
"LANGUAGE-russian",
"anaconda_main_hub_begin_installation"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

View File

@ -0,0 +1,16 @@
{
"properties": [],
"area": [
{
"xpos": 49,
"ypos": 141,
"width": 157,
"height": 15,
"type": "match"
}
],
"tags": [
"LANGUAGE-russian",
"anaconda_minimal_highlighted"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

View File

@ -0,0 +1,16 @@
{
"area": [
{
"xpos": 31,
"ypos": 141,
"width": 173,
"height": 15,
"type": "match"
}
],
"properties": [],
"tags": [
"LANGUAGE-russian",
"anaconda_minimal_selected"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

View File

@ -0,0 +1,16 @@
{
"properties": [],
"area": [
{
"xpos": 570,
"ypos": 449,
"width": 212,
"height": 17,
"type": "match"
}
],
"tags": [
"LANGUAGE-russian",
"anaconda_rawhide_accept_fate"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@ -0,0 +1,16 @@
{
"area": [
{
"xpos": 27,
"ypos": 52,
"width": 56,
"height": 21,
"type": "match"
}
],
"properties": [],
"tags": [
"LANGUAGE-russian",
"anaconda_spoke_done"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

View File

@ -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 => [

View File

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

View File

@ -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";