1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-26 23:53:08 +00:00

Rebase the PR to fit within the current status quo.

This commit is contained in:
Lukas Ruzicka 2024-06-20 15:39:34 +02:00 committed by Adam Williamson
parent 4315e5ff6f
commit c392480f92
138 changed files with 919 additions and 419 deletions

View File

@ -64,7 +64,7 @@ sub init() {
# If this should change in the future, we would need to enhance this routine. # If this should change in the future, we would need to enhance this routine.
sub x11_start_program { sub x11_start_program {
my ($self, $program, $timeout, $options) = @_; my ($self, $program, $timeout, $options) = @_;
send_key (get_var("DESKTOP") eq "i3" ? get_i3_modifier() . "-d" : "alt-f2"); send_key(get_var("DESKTOP") eq "i3" ? "alt-d" : "alt-f2");
assert_screen "desktop_runner"; assert_screen "desktop_runner";
type_string $program, 20; type_string $program, 20;
sleep 5; # because of KDE dialog - SUSE guys are doing the same! sleep 5; # because of KDE dialog - SUSE guys are doing the same!
@ -183,19 +183,5 @@ sub assert_script_sudo {
return; return;
} }
sub become_root {
my ($self) = @_;
my $rootpwd = get_var("ROOT_PASSWORD", "weakpassword");
if (check_screen("apps_run_terminal") || is_serial_terminal()) {
type_string("su -\n");
sleep(2);
type_string("$rootpwd\n");
} else {
die "No terminal to become root is present";
}
}
1; 1;
# vim: set sw=4 et: # vim: set sw=4 et:

View File

@ -8,48 +8,17 @@ use Exporter;
use testapi; use testapi;
use utils; use utils;
our @EXPORT = qw/firstlaunch_setup get_i3_modifier create_user_i3_config launch_terminal/; our @EXPORT = qw/create_user_i3_config/;
sub get_i3_modifier {
return get_var("I3_MODIFIER", 'alt');
}
sub firstlaunch_setup {
my %args = @_;
my $timeout = $args{timeout} || 30;
my $modifier = $args{modifier} || get_i3_modifier();
die "invalid modifier $modifier, only alt and super are possible" unless (($modifier eq 'alt') || ($modifier eq 'super'));
assert_screen('i3_firstlaunch_wizard', $timeout);
if ($modifier eq 'alt') {
send_key('esc', wait_screen_change => 1);
} else {
send_key('ret', wait_screen_change => 1);
send_key_until_needlematch('down', 'i3_generate_config');
send_key('ret', wait_screen_change => 1);
}
}
sub create_user_i3_config { sub create_user_i3_config {
my %args = @_; my %args = @_;
my $login = $args{login}; my $login = $args{login};
my $remove_config_wizard = $args{remove_config_wizard} || 1;
assert_script_run("mkdir -p /home/$login/.config/i3/"); assert_script_run("mkdir -p /home/$login/.config/i3/");
# ensure that no alias of cp prevents an existing config from being overwritten # ensure that no alias of cp prevents an existing config from being overwritten
assert_script_run("/usr/bin/cp -f /etc/i3/config /home/$login/.config/i3/config"); assert_script_run("/usr/bin/cp -f /etc/i3/config /home/$login/.config/i3/config");
if ($remove_config_wizard) {
assert_script_run("sed -i '/i3-config-wizard/d' /home/$login/.config/i3/config"); assert_script_run("sed -i '/i3-config-wizard/d' /home/$login/.config/i3/config");
} assert_script_run "chown -R $login:$login /home/$login/.config";
assert_script_run "chown -R $login.$login /home/$login/.config";
assert_script_run "restorecon -vr /home/$login/.config"; assert_script_run "restorecon -vr /home/$login/.config";
} }
sub launch_terminal {
send_key(get_i3_modifier() . '-ret');
assert_screen("apps_run_terminal");
}

View File

@ -814,12 +814,23 @@ sub console_initial_setup {
sub handle_welcome_screen { sub handle_welcome_screen {
# handle the 'welcome' screen on GNOME and KDE since F38. shared # handle the 'welcome' screen on GNOME and KDE since F38. shared
# in a few places # in a few places
if (check_screen "getting_started", 45) { my %args = @_;
my $timeout = $args{timeout} || 45;
if (check_screen "getting_started", $timeout) {
if (get_var("DESKTOP") eq "kde") { if (get_var("DESKTOP") eq "kde") {
# just closing it seems to result in it running again on # just closing it seems to result in it running again on
# next boot, so let's click Skip # next boot, so let's click Skip
click_lastmatch; click_lastmatch;
} }
elsif (get_var("DESKTOP") eq "i3") {
# Press enter to start config, then move one line down
# and press enter once more to confirm.
send_key("ret");
sleep(1);
send_key("down");
sleep(1);
send_key("ret");
}
else { else {
send_key "alt-f4"; send_key "alt-f4";
# for GNOME 40, alt-f4 doesn't work # for GNOME 40, alt-f4 doesn't work
@ -1083,7 +1094,6 @@ sub check_desktop {
# close it if it's open. # close it if it's open.
my %args = ( my %args = (
timeout => 30, timeout => 30,
no_firstlaunch_check => 0,
@_ @_
); );
my $count = 5; my $count = 5;
@ -1111,34 +1121,11 @@ sub check_desktop {
} }
} }
if (get_var("DESKTOP") eq 'i3') {
my $version = get_var('VERSION');
# i3 launches pretty quickly, but sometimes we have to wait for the
# whole VM to launch
assert_screen("i3-bar", $args{timeout});
if ($version ne "Rawhide") {
assert_screen("${version}_background");
}
unless ($args{no_firstlaunch_check}) {
die "firstlaunch setup is present" if defined(check_screen('i3_firstlaunch_wizard'));
}
} else {
assert_screen "apps_menu_button", $args{timeout};
# GNOME 40 starts on the overview by default; for consistency with
# older GNOME and KDE, let's just close it
if (match_has_tag "apps_menu_button_active") {
wait_still_screen 3;
send_key "alt-f1";
assert_screen "apps_menu_button_inactive";
}
}
if ($activematched) { if ($activematched) {
# make sure we got to inactive after active # make sure we got to inactive after active
die "never reached apps_menu_button_inactive!" unless (match_has_tag "apps_menu_button_inactive"); die "never reached apps_menu_button_inactive!" unless (match_has_tag "apps_menu_button_inactive");
} }
}
sub quit_firefox { sub quit_firefox {
# Quit Firefox, handling the 'close multiple tabs' warning screen if # Quit Firefox, handling the 'close multiple tabs' warning screen if
@ -1398,22 +1385,23 @@ sub menu_launch_type {
my $app = shift; my $app = shift;
# To overcome BZ2097208, let's move the mouse out of the way # To overcome BZ2097208, let's move the mouse out of the way
# and give the launcher some time to take the correct focus. # and give the launcher some time to take the correct focus.
if (get_var("DESKTOP") eq "i3") {
send_key("alt-d");
}
else {
if (get_var("DESKTOP") eq "kde") { if (get_var("DESKTOP") eq "kde") {
diag("Moving the mouse away from the launcher."); diag("Moving the mouse away from the launcher.");
mouse_set(1, 1); mouse_set(1, 1);
} }
if (get_var("DESKTOP") eq "i3") {
send_key(get_var("I3_MODIFIER", 'alt') . "-d");
} else {
wait_screen_change { send_key 'super'; }; wait_screen_change { send_key 'super'; };
# srsly KDE y u so slo # srsly KDE y u so slo
wait_still_screen 3; wait_still_screen 3;
}
type_very_safely $app; type_very_safely $app;
# Wait for KDE to place focus correctly. # Wait for KDE to place focus correctly.
wait_still_screen 2; wait_still_screen 2;
send_key 'ret'; send_key 'ret';
wait_still_screen 3; wait_still_screen 3;
}
} }
sub tell_source { sub tell_source {
@ -1669,7 +1657,7 @@ sub solidify_wallpaper {
} }
elsif ($desktop eq "gnome") { elsif ($desktop eq "gnome") {
# Start the terminal to set up backgrounds. # Start the terminal to set up backgrounds.
menu_launch_type "terminal"; menu_launch_type("terminal");
# wait to be sure it's fully open # wait to be sure it's fully open
wait_still_screen(stilltime => 5, similarity_level => 38); wait_still_screen(stilltime => 5, similarity_level => 38);
# When the application opens, run command in it to set the background to black # When the application opens, run command in it to set the background to black

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

View File

@ -1,36 +0,0 @@
{
"area": [
{
"xpos": 3,
"ypos": 3,
"width": 95,
"height": 11,
"type": "match"
},
{
"xpos": 17,
"ypos": 22,
"width": 68,
"height": 25,
"type": "match"
},
{
"xpos": 111,
"ypos": 26,
"width": 71,
"height": 20,
"type": "match"
},
{
"xpos": 209,
"ypos": 25,
"width": 106,
"height": 21,
"type": "match"
}
],
"properties": [],
"tags": [
"audio_mixer"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"width": 30,
"type": "match",
"xpos": 483,
"ypos": 511,
"height": 18
}
],
"properties": [],
"tags": [
"firefox_addon_add"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

View File

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 106 KiB

View File

@ -0,0 +1,22 @@
{
"area": [
{
"ypos": 511,
"xpos": 528,
"height": 17,
"type": "match",
"width": 62
},
{
"width": 20,
"type": "match",
"xpos": 951,
"ypos": 75,
"height": 19
}
],
"properties": [],
"tags": [
"firefox_addon_success"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

View File

@ -0,0 +1,22 @@
{
"area": [
{
"xpos": 555,
"ypos": 24,
"width": 38,
"height": 17,
"type": "match"
},
{
"xpos": 513,
"ypos": 3,
"width": 64,
"height": 13,
"type": "match"
}
],
"properties": [],
"tags": [
"apps_run_blivetgui"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

View File

@ -0,0 +1,22 @@
{
"area": [
{
"xpos": 762,
"ypos": 4,
"width": 51,
"height": 12,
"type": "match"
},
{
"xpos": 870,
"ypos": 23,
"width": 67,
"height": 20,
"type": "match"
}
],
"properties": [],
"tags": [
"apps_run_mousepad"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"ypos": 3,
"xpos": 2,
"height": 13,
"type": "match",
"width": 112
}
],
"properties": [],
"tags": [
"apps_run_terminal"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -0,0 +1,22 @@
{
"area": [
{
"type": "match",
"width": 52,
"ypos": 3,
"xpos": 2,
"height": 14
},
{
"xpos": 128,
"ypos": 26,
"width": 57,
"height": 15,
"type": "match"
}
],
"properties": [],
"tags": [
"apps_run_terminal"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -0,0 +1,29 @@
{
"area": [
{
"xpos": 493,
"ypos": 300,
"width": 143,
"height": 17,
"type": "match"
},
{
"width": 201,
"type": "match",
"height": 16,
"xpos": 514,
"ypos": 401
},
{
"xpos": 519,
"ypos": 434,
"height": 14,
"width": 214,
"type": "match"
}
],
"properties": [],
"tags": [
"getting_started"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 904 KiB

View File

@ -1,9 +1,9 @@
{ {
"area": [ "area": [
{ {
"xpos": 493, "xpos": 492,
"ypos": 281, "ypos": 283,
"width": 137, "width": 142,
"height": 13, "height": 13,
"type": "match" "type": "match"
}, },
@ -24,6 +24,6 @@
], ],
"properties": [], "properties": [],
"tags": [ "tags": [
"i3_firstlaunch_wizard" "getting_started"
] ]
} }

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -0,0 +1,31 @@
{
"area": [
{
"type": "match",
"width": 16,
"height": 17,
"ypos": 748,
"xpos": 2
},
{
"height": 14,
"ypos": 751,
"xpos": 408,
"type": "match",
"width": 15
},
{
"height": 14,
"xpos": 460,
"ypos": 750,
"width": 18,
"type": "match"
}
],
"properties": [],
"tags": [
"i3-bar",
"apps_menu_button",
"apps_menu_button_inactive"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

@ -24,6 +24,8 @@
], ],
"properties": [], "properties": [],
"tags": [ "tags": [
"i3-bar" "i3-bar",
"apps_menu_button",
"apps_menu_button_inactive"
] ]
} }

View File

Before

Width:  |  Height:  |  Size: 914 KiB

After

Width:  |  Height:  |  Size: 914 KiB

View File

@ -0,0 +1,22 @@
{
"area": [
{
"xpos": 343,
"ypos": 3,
"width": 62,
"height": 15,
"type": "match"
},
{
"xpos": 7,
"ypos": 716,
"width": 123,
"height": 23,
"type": "match"
}
],
"properties": [],
"tags": [
"blivet_gui_application"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

View File

@ -0,0 +1,29 @@
{
"area": [
{
"ypos": 0,
"xpos": 1,
"height": 17,
"type": "match",
"width": 44
},
{
"ypos": 2,
"xpos": 998,
"height": 18,
"type": "match",
"width": 25
},
{
"xpos": 370,
"ypos": 5,
"width": 24,
"height": 15,
"type": "match"
}
],
"properties": [],
"tags": [
"desktop_runner"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

@ -0,0 +1,25 @@
{
"area": [
{
"height": 41,
"ypos": 369,
"xpos": 460,
"type": "match",
"width": 130
},
{
"xpos": 599,
"ypos": 425,
"height": 24,
"width": 53,
"type": "match"
}
],
"properties": [],
"tags": [
"login_screen",
"graphical_login_input",
"graphical_login",
"lightdm_login_screen"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

@ -0,0 +1,26 @@
{
"area": [
{
"type": "match",
"width": 180,
"height": 17,
"ypos": 7,
"xpos": 4
},
{
"click_point": {
"ypos": 7.5,
"xpos": 36.5
},
"type": "match",
"ypos": 9,
"width": 73,
"xpos": 891,
"height": 15
}
],
"properties": [],
"tags": [
"i3-logout-bar"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -1,19 +1,19 @@
{ {
"area": [ "area": [
{ {
"xpos": 227, "ypos": 623,
"ypos": 200,
"width": 113,
"height": 21,
"type": "match",
"click_point": { "click_point": {
"xpos": 56.5, "xpos": 28,
"ypos": 10.5 "ypos": 10.5
} },
"type": "match",
"xpos": 738,
"height": 21,
"width": 56
} }
], ],
"properties": [], "properties": [],
"tags": [ "tags": [
"printing_pdfprinter_ready" "printing_print"
] ]
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"height": 19,
"xpos": 713,
"ypos": 60,
"width": 285,
"type": "match"
}
],
"properties": [],
"tags": [
"i3_dunst_foo_notification"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 720,
"type": "match",
"ypos": 58,
"width": 74,
"height": 35
}
],
"properties": [],
"tags": [
"i3_dunst_foo_notification"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -0,0 +1,29 @@
{
"area": [
{
"ypos": 2,
"xpos": 0,
"height": 16,
"type": "match",
"width": 679
},
{
"type": "match",
"width": 373,
"height": 128,
"ypos": 396,
"xpos": 328
},
{
"xpos": 497,
"ypos": 42,
"height": 23,
"width": 132,
"type": "match"
}
],
"properties": [],
"tags": [
"i3_windows_split"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

View File

@ -0,0 +1,22 @@
{
"area": [
{
"ypos": 0,
"height": 47,
"width": 100,
"xpos": 630,
"type": "match"
},
{
"xpos": 309,
"ypos": 2,
"width": 69,
"height": 40,
"type": "match"
}
],
"properties": [],
"tags": [
"i3_windows_split"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"height": 55,
"ypos": 2,
"xpos": 0,
"type": "match",
"width": 117
}
],
"properties": [],
"tags": [
"i3_windows_stacked"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"ypos": 2,
"width": 117,
"height": 55,
"xpos": 0,
"type": "match"
}
],
"properties": [],
"tags": [
"i3_windows_stacked"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"height": 18,
"xpos": 0,
"ypos": 2,
"width": 824,
"type": "match"
}
],
"properties": [],
"tags": [
"i3_windows_tabbed"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"type": "match",
"xpos": 460,
"height": 46,
"width": 112,
"ypos": 0
}
],
"properties": [],
"tags": [
"i3_windows_tabbed"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 827 KiB

After

Width:  |  Height:  |  Size: 827 KiB

View File

Before

Width:  |  Height:  |  Size: 828 KiB

After

Width:  |  Height:  |  Size: 828 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1,33 @@
{
"area": [
{
"xpos": 966,
"height": 19,
"width": 54,
"ypos": 4,
"type": "match",
"click_point": {
"ypos": 9.5,
"xpos": 42
}
},
{
"width": 89,
"type": "match",
"xpos": 358,
"ypos": 321,
"height": 91
},
{
"width": 56,
"type": "match",
"xpos": 597,
"ypos": 424,
"height": 25
}
],
"properties": [],
"tags": [
"lightdm_power_menu"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,40 @@
{
"area": [
{
"type": "match",
"width": 76,
"height": 85,
"ypos": 322,
"xpos": 366
},
{
"height": 21,
"ypos": 426,
"xpos": 599,
"type": "match",
"width": 54
},
{
"height": 21,
"xpos": 861,
"width": 82,
"ypos": 85,
"type": "match",
"click_point": {
"xpos": 41,
"ypos": 10.5
}
},
{
"width": 59,
"type": "match",
"xpos": 965,
"ypos": 1,
"height": 25
}
],
"properties": [],
"tags": [
"lightdm_power_menu-reboot"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 663,
"ypos": 428,
"width": 51,
"height": 21,
"type": "match"
}
],
"properties": [],
"tags": [
"lightdm_power_menu-reboot-confirm"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 834 KiB

After

Width:  |  Height:  |  Size: 834 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 659,
"ypos": 428,
"width": 65,
"height": 20,
"type": "match"
}
],
"properties": [],
"tags": [
"lightdm_power_menu-shutdown-confirm"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 841 KiB

After

Width:  |  Height:  |  Size: 841 KiB

View File

@ -0,0 +1,33 @@
{
"area": [
{
"type": "match",
"width": 51,
"ypos": 426,
"xpos": 600,
"height": 21
},
{
"width": 43,
"xpos": 624,
"height": 47,
"type": "match",
"click_point": {
"ypos": 23.5,
"xpos": 21.5
},
"ypos": 320
},
{
"height": 90,
"ypos": 321,
"xpos": 364,
"type": "match",
"width": 81
}
],
"properties": [],
"tags": [
"lightdm_user_selection"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Some files were not shown because too many files have changed in this diff Show More