Add screen checking
All checks were successful
|
|
@ -373,7 +373,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);
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 26 KiB |
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 423,
|
||||
"ypos": 547,
|
||||
"width": 182,
|
||||
"type": "match",
|
||||
"height": 20
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"gis_button_start_fedora"
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 16 KiB |
|
|
@ -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"
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 60 KiB |
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"type": "match",
|
||||
"height": 26,
|
||||
"width": 136,
|
||||
"xpos": 235,
|
||||
"ypos": 365
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"gis_field_confirm_password"
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 23 KiB |
|
|
@ -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"
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 27 KiB |
|
|
@ -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"
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 27 KiB |
|
|
@ -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"
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 27 KiB |
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"type": "match",
|
||||
"height": 22,
|
||||
"width": 80,
|
||||
"xpos": 471,
|
||||
"ypos": 45
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"gis_screen_credentials"
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 23 KiB |
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"ypos": 43,
|
||||
"xpos": 474,
|
||||
"type": "match",
|
||||
"height": 21,
|
||||
"width": 77
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"gis_screen_password"
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 22 KiB |
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"width": 73,
|
||||
"height": 24,
|
||||
"type": "match",
|
||||
"ypos": 44,
|
||||
"xpos": 475
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"gis_screen_privacy"
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 27 KiB |
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"ypos": 44,
|
||||
"xpos": 422,
|
||||
"height": 25,
|
||||
"type": "match",
|
||||
"width": 181
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"gis_screen_software"
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 26 KiB |
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"width": 111,
|
||||
"height": 25,
|
||||
"type": "match",
|
||||
"xpos": 459,
|
||||
"ypos": 44
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"gis_screen_timezone"
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 71 KiB |
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 240,
|
||||
"ypos": 507,
|
||||
"width": 251,
|
||||
"height": 25,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"gis_screen_welcome"
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 60 KiB |
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||