Compare commits
5 Commits
b7487e97e9
...
5ad36cf3c7
Author | SHA1 | Date | |
---|---|---|---|
|
5ad36cf3c7 | ||
|
145bbb10af | ||
|
d4b17daeaa | ||
|
e9e967c4bf | ||
|
1f4324b270 |
24
lib/utils.pm
@ -6,7 +6,7 @@ use base 'Exporter';
|
|||||||
use Exporter;
|
use Exporter;
|
||||||
use lockapi;
|
use lockapi;
|
||||||
use testapi qw(is_serial_terminal :DEFAULT);
|
use testapi qw(is_serial_terminal :DEFAULT);
|
||||||
our @EXPORT = qw/run_with_error_check type_safely type_very_safely desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type setup_repos repo_setup get_workarounds disable_updates_repos cleanup_workaround_repo console_initial_setup handle_welcome_screen gnome_initial_setup anaconda_create_user check_desktop quit_firefox advisory_get_installed_packages acnp_handle_output advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile get_release_number check_left_bar check_top_bar check_prerelease check_version spell_version_number _assert_and_click is_branched rec_log repos_mirrorlist register_application get_registered_applications solidify_wallpaper check_and_install_git download_testdata make_serial_writable set_update_notification_timestamp kde_doublek_workaround dm_perform_login/;
|
our @EXPORT = qw/run_with_error_check type_safely type_very_safely desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type setup_repos repo_setup get_workarounds disable_updates_repos cleanup_workaround_repo console_initial_setup handle_welcome_screen gnome_initial_setup anaconda_create_user check_desktop quit_firefox advisory_get_installed_packages acnp_handle_output advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile get_release_number check_left_bar check_top_bar check_prerelease check_version spell_version_number _assert_and_click is_branched rec_log repos_mirrorlist register_application get_registered_applications desktop_launch_terminal solidify_wallpaper check_and_install_git download_testdata make_serial_writable set_update_notification_timestamp kde_doublek_workaround dm_perform_login/;
|
||||||
|
|
||||||
|
|
||||||
# We introduce this global variable to hold the list of applications that have
|
# We introduce this global variable to hold the list of applications that have
|
||||||
@ -1609,6 +1609,22 @@ sub register_application {
|
|||||||
print("APPLICATION REGISTERED: $application \n");
|
print("APPLICATION REGISTERED: $application \n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# launch a terminal from a desktop, using the most efficient/reliable
|
||||||
|
# approach (not appropriate if we really need to test launching it a
|
||||||
|
# specific way)
|
||||||
|
sub desktop_launch_terminal {
|
||||||
|
my $desktop = get_var("DESKTOP");
|
||||||
|
if ($desktop eq "i3") {
|
||||||
|
send_key "alt-ret";
|
||||||
|
}
|
||||||
|
elsif ($desktop eq "kde") {
|
||||||
|
send_key "ctrl-alt-t";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
menu_launch_type "terminal";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# The KDE desktop tests are very difficult to maintain, because the transparency
|
# The KDE desktop tests are very difficult to maintain, because the transparency
|
||||||
# of the menu requires a lot of different needles to cover the elements.
|
# of the menu requires a lot of different needles to cover the elements.
|
||||||
# Therefore it is useful to change the background to a solid colour.
|
# Therefore it is useful to change the background to a solid colour.
|
||||||
@ -1652,7 +1668,8 @@ 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");
|
desktop_launch_terminal;
|
||||||
|
assert_screen "apps_run_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
|
||||||
@ -1760,7 +1777,8 @@ sub set_update_notification_timestamp {
|
|||||||
sub start_applications {
|
sub start_applications {
|
||||||
my @applications = @_;
|
my @applications = @_;
|
||||||
# Open the terminal
|
# Open the terminal
|
||||||
menu_launch_type("terminal");
|
desktop_launch_terminal;
|
||||||
|
assert_screen("apps_run_terminal");
|
||||||
wait_still_screen(2);
|
wait_still_screen(2);
|
||||||
# Iterate over the application list
|
# Iterate over the application list
|
||||||
# and start each application from it.
|
# and start each application from it.
|
||||||
|
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"area": [
|
||||||
|
{
|
||||||
|
"height": 20,
|
||||||
|
"width": 116,
|
||||||
|
"ypos": 176,
|
||||||
|
"xpos": 233,
|
||||||
|
"type": "match"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"name": "workaround",
|
||||||
|
"value": "https://gitlab.gnome.org/GNOME/evince/-/issues/2051"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"nautilus_test_file_another"
|
||||||
|
]
|
||||||
|
}
|
After Width: | Height: | Size: 60 KiB |
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"area": [
|
|
||||||
{
|
|
||||||
"width": 41,
|
|
||||||
"type": "match",
|
|
||||||
"ypos": 173,
|
|
||||||
"xpos": 191,
|
|
||||||
"height": 21
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"properties": [],
|
|
||||||
"tags": [
|
|
||||||
"user_confirm_jack"
|
|
||||||
]
|
|
||||||
}
|
|
Before Width: | Height: | Size: 18 KiB |
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"area": [
|
|
||||||
{
|
|
||||||
"height": 21,
|
|
||||||
"width": 39,
|
|
||||||
"ypos": 165,
|
|
||||||
"type": "match",
|
|
||||||
"xpos": 185
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"properties": [],
|
|
||||||
"tags": [
|
|
||||||
"user_confirm_jack"
|
|
||||||
]
|
|
||||||
}
|
|
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 38 KiB |
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"area": [
|
|
||||||
{
|
|
||||||
"height": 15,
|
|
||||||
"type": "match",
|
|
||||||
"ypos": 176,
|
|
||||||
"xpos": 193,
|
|
||||||
"width": 31
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"properties": [],
|
|
||||||
"tags": [
|
|
||||||
"user_confirm_jim"
|
|
||||||
]
|
|
||||||
}
|
|
Before Width: | Height: | Size: 17 KiB |
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"area": [
|
|
||||||
{
|
|
||||||
"height": 15,
|
|
||||||
"width": 31,
|
|
||||||
"ypos": 168,
|
|
||||||
"xpos": 185,
|
|
||||||
"type": "match"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"properties": [],
|
|
||||||
"tags": [
|
|
||||||
"user_confirm_jim"
|
|
||||||
]
|
|
||||||
}
|
|
Before Width: | Height: | Size: 25 KiB |
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"area": [
|
|
||||||
{
|
|
||||||
"height": 15,
|
|
||||||
"width": 31,
|
|
||||||
"xpos": 185,
|
|
||||||
"ypos": 168,
|
|
||||||
"type": "match"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"properties": [],
|
|
||||||
"tags": [
|
|
||||||
"user_confirm_jim"
|
|
||||||
]
|
|
||||||
}
|
|
Before Width: | Height: | Size: 38 KiB |
@ -1,15 +1,15 @@
|
|||||||
{
|
{
|
||||||
"area": [
|
"area": [
|
||||||
{
|
{
|
||||||
"width": 39,
|
|
||||||
"height": 21,
|
|
||||||
"type": "match",
|
"type": "match",
|
||||||
"xpos": 185,
|
"xpos": 574,
|
||||||
"ypos": 165
|
"ypos": 674,
|
||||||
|
"height": 21,
|
||||||
|
"width": 19
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"properties": [],
|
"properties": [],
|
||||||
"tags": [
|
"tags": [
|
||||||
"user_confirm_jack"
|
"leave_button"
|
||||||
]
|
]
|
||||||
}
|
}
|
BIN
needles/kde/leave_button-fuzzy-20241009.png
Normal file
After Width: | Height: | Size: 74 KiB |
16
needles/kde/locked_screen_switch_user-20241009.json
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"area": [
|
||||||
|
{
|
||||||
|
"ypos": 597,
|
||||||
|
"type": "match",
|
||||||
|
"xpos": 544,
|
||||||
|
"width": 32,
|
||||||
|
"height": 42
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"properties": [],
|
||||||
|
"tags": [
|
||||||
|
"DESKTOP-kde",
|
||||||
|
"locked_screen_switch_user"
|
||||||
|
]
|
||||||
|
}
|
BIN
needles/kde/locked_screen_switch_user-20241009.png
Normal file
After Width: | Height: | Size: 69 KiB |
15
needles/kde/reboot_entry_kde-fuzzy-20241009.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"area": [
|
||||||
|
{
|
||||||
|
"width": 19,
|
||||||
|
"height": 20,
|
||||||
|
"xpos": 384,
|
||||||
|
"type": "match",
|
||||||
|
"ypos": 675
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"properties": [],
|
||||||
|
"tags": [
|
||||||
|
"reboot_entry"
|
||||||
|
]
|
||||||
|
}
|
BIN
needles/kde/reboot_entry_kde-fuzzy-20241009.png
Normal file
After Width: | Height: | Size: 75 KiB |
16
needles/kde/switch_user_entry-20241009.json
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"area": [
|
||||||
|
{
|
||||||
|
"xpos": 530,
|
||||||
|
"ypos": 641,
|
||||||
|
"width": 19,
|
||||||
|
"height": 23,
|
||||||
|
"type": "match"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"properties": [],
|
||||||
|
"tags": [
|
||||||
|
"DESKTOP-kde",
|
||||||
|
"switch_user_entry"
|
||||||
|
]
|
||||||
|
}
|
BIN
needles/kde/switch_user_entry-20241009.png
Normal file
After Width: | Height: | Size: 113 KiB |
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"area": [
|
|
||||||
{
|
|
||||||
"height": 15,
|
|
||||||
"xpos": 40,
|
|
||||||
"ypos": 217,
|
|
||||||
"type": "match",
|
|
||||||
"width": 31
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"properties": [],
|
|
||||||
"tags": [
|
|
||||||
"user_confirm_jack"
|
|
||||||
]
|
|
||||||
}
|
|
Before Width: | Height: | Size: 59 KiB |
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"area": [
|
|
||||||
{
|
|
||||||
"height": 16,
|
|
||||||
"type": "match",
|
|
||||||
"ypos": 200,
|
|
||||||
"width": 31,
|
|
||||||
"xpos": 44
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"properties": [],
|
|
||||||
"tags": [
|
|
||||||
"user_confirm_jack"
|
|
||||||
]
|
|
||||||
}
|
|
Before Width: | Height: | Size: 102 KiB |
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"area": [
|
|
||||||
{
|
|
||||||
"ypos": 215,
|
|
||||||
"type": "match",
|
|
||||||
"width": 26,
|
|
||||||
"xpos": 39,
|
|
||||||
"height": 17
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"properties": [],
|
|
||||||
"tags": [
|
|
||||||
"user_confirm_jim"
|
|
||||||
]
|
|
||||||
}
|
|
Before Width: | Height: | Size: 58 KiB |
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"area": [
|
|
||||||
{
|
|
||||||
"width": 26,
|
|
||||||
"xpos": 43,
|
|
||||||
"ypos": 199,
|
|
||||||
"type": "match",
|
|
||||||
"height": 17
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"properties": [],
|
|
||||||
"tags": [
|
|
||||||
"user_confirm_jim"
|
|
||||||
]
|
|
||||||
}
|
|
Before Width: | Height: | Size: 101 KiB |
@ -6,7 +6,8 @@ use utils;
|
|||||||
|
|
||||||
sub run {
|
sub run {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
menu_launch_type 'terminal';
|
desktop_launch_terminal;
|
||||||
|
assert_screen "apps_run_terminal";
|
||||||
wait_still_screen 5;
|
wait_still_screen 5;
|
||||||
type_very_safely "vncviewer -FullScreen -listen\n";
|
type_very_safely "vncviewer -FullScreen -listen\n";
|
||||||
mutex_create 'vncconnect_client_ready';
|
mutex_create 'vncconnect_client_ready';
|
||||||
|
@ -24,7 +24,7 @@ sub run {
|
|||||||
my $self = shift;
|
my $self = shift;
|
||||||
# Open the terminal to enable us to set the
|
# Open the terminal to enable us to set the
|
||||||
# volume level.
|
# volume level.
|
||||||
menu_launch_type("terminal");
|
desktop_launch_terminal;
|
||||||
assert_screen("apps_run_terminal");
|
assert_screen("apps_run_terminal");
|
||||||
# Set the volume to 0%
|
# Set the volume to 0%
|
||||||
type_safely('amixer -D pipewire sset Master 0%');
|
type_safely('amixer -D pipewire sset Master 0%');
|
||||||
|
@ -63,10 +63,8 @@ sub connect_localhost {
|
|||||||
# Therefore, we will use a different approach - we will enable
|
# Therefore, we will use a different approach - we will enable
|
||||||
# CLI keyring integration and perform an SFTP connection
|
# CLI keyring integration and perform an SFTP connection
|
||||||
# in Konsole.
|
# in Konsole.
|
||||||
# try and avoid double-typing issues
|
desktop_launch_terminal;
|
||||||
kde_doublek_workaround;
|
assert_screen("apps_run_terminal");
|
||||||
menu_launch_type("konsole");
|
|
||||||
assert_screen("konsole_runs");
|
|
||||||
# Export the environmental variables, this is needed for the process
|
# Export the environmental variables, this is needed for the process
|
||||||
# to work correctly.
|
# to work correctly.
|
||||||
export_kde_vars();
|
export_kde_vars();
|
||||||
|
@ -28,18 +28,11 @@ sub export_kde_vars {
|
|||||||
sub connect_localhost {
|
sub connect_localhost {
|
||||||
my $type = shift;
|
my $type = shift;
|
||||||
|
|
||||||
# Start the terminal application. On KDE also export the variables.
|
# Start the terminal application
|
||||||
if (get_var("DESKTOP") eq "gnome") {
|
desktop_launch_terminal;
|
||||||
menu_launch_type("terminal");
|
|
||||||
assert_screen("apps_run_terminal");
|
assert_screen("apps_run_terminal");
|
||||||
}
|
# On KDE also export the variables
|
||||||
else {
|
export_kde_vars() if (get_var("DESKTOP") eq "kde");
|
||||||
# try and avoid double-typing issues
|
|
||||||
kde_doublek_workaround;
|
|
||||||
menu_launch_type("konsole");
|
|
||||||
assert_screen("konsole_runs");
|
|
||||||
export_kde_vars();
|
|
||||||
}
|
|
||||||
|
|
||||||
# Establish the SFTP connection to the localhost.
|
# Establish the SFTP connection to the localhost.
|
||||||
# A dialogue should appear to collect credentials to open
|
# A dialogue should appear to collect credentials to open
|
||||||
|
@ -9,6 +9,8 @@ sub run {
|
|||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
# Start the application
|
# Start the application
|
||||||
|
# we don't use desktop_launch_terminal here as we specifically
|
||||||
|
# want to run 'konsole' from the kicker menu in this test
|
||||||
menu_launch_type 'konsole';
|
menu_launch_type 'konsole';
|
||||||
# Check that it is started
|
# Check that it is started
|
||||||
assert_screen 'konsole_runs', timeout => 60;
|
assert_screen 'konsole_runs', timeout => 60;
|
||||||
|
@ -27,12 +27,12 @@ sub run {
|
|||||||
desktop_switch_layout 'ascii';
|
desktop_switch_layout 'ascii';
|
||||||
wait_still_screen(2);
|
wait_still_screen(2);
|
||||||
|
|
||||||
menu_launch_type("terminal");
|
desktop_launch_terminal;
|
||||||
# Similarly to _graphical_input.pm, repeat running the command
|
# Similarly to _graphical_input.pm, repeat running the command
|
||||||
# if it fails the first time (it often does).
|
# if it fails the first time (it often does).
|
||||||
unless (check_screen "apps_run_terminal", 30) {
|
unless (check_screen "apps_run_terminal", 30) {
|
||||||
check_desktop;
|
check_desktop;
|
||||||
menu_launch_type("terminal");
|
desktop_launch_terminal;
|
||||||
}
|
}
|
||||||
assert_screen("apps_run_terminal");
|
assert_screen("apps_run_terminal");
|
||||||
wait_still_screen(stilltime => 5, similarity_level => 42);
|
wait_still_screen(stilltime => 5, similarity_level => 42);
|
||||||
|
@ -115,32 +115,21 @@ sub login_user {
|
|||||||
|
|
||||||
sub check_user_logged_in {
|
sub check_user_logged_in {
|
||||||
# Performs a check that a correct user has been locked in.
|
# Performs a check that a correct user has been locked in.
|
||||||
my $user = shift;
|
my %args = @_;
|
||||||
my $exitkey;
|
$args{termopen} //= 0;
|
||||||
# In Gnome, the name of the user was accessible through menu
|
$args{keepterm} //= 0;
|
||||||
# in the upper right corner, but apparently it has been removed.
|
my $user = $args{user};
|
||||||
# Reading the login name from the terminal prompt seems to be
|
# In Gnome and i3, the current user's name is not easily visible,
|
||||||
# the most reliable thing to do.
|
# so reading the login name from the terminal prompt seems to be
|
||||||
if ($desktop eq "gnome") {
|
# the most reliable thing to do. In KDE we could see it on the
|
||||||
menu_launch_type("terminal");
|
# launcher menu, but it keeps things clean if we use the same
|
||||||
wait_still_screen 2;
|
# approach for all desktops.
|
||||||
$exitkey = "alt-f4";
|
my $exitkey = "alt-f4";
|
||||||
}
|
$exitkey = "shift-ctrl-q" if ($desktop eq "i3");
|
||||||
elsif ($desktop eq "i3") {
|
desktop_launch_terminal unless ($args{termopen});
|
||||||
send_key("alt-ret");
|
|
||||||
assert_screen("apps_run_terminal");
|
assert_screen("apps_run_terminal");
|
||||||
assert_script_run('[ $(whoami) = "' . "$user\" ]");
|
assert_script_run('[ $(whoami) = "' . "$user\" ]");
|
||||||
wait_screen_change { send_key("alt-shift-q"); };
|
send_key $exitkey unless ($args{keepterm});
|
||||||
return;
|
|
||||||
}
|
|
||||||
# With KDE, the user is shown in the main menu, so let us just
|
|
||||||
# open this and see.
|
|
||||||
else {
|
|
||||||
assert_and_click "system_menu_button";
|
|
||||||
$exitkey = "esc";
|
|
||||||
}
|
|
||||||
assert_screen "user_confirm_$user";
|
|
||||||
send_key $exitkey;
|
|
||||||
wait_still_screen 5;
|
wait_still_screen 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,7 +152,6 @@ sub logout_user {
|
|||||||
sub switch_user {
|
sub switch_user {
|
||||||
# Switch the user, i.e. leave the current user logged in and
|
# Switch the user, i.e. leave the current user logged in and
|
||||||
# log in another user simultaneously.
|
# log in another user simultaneously.
|
||||||
send_key "ret";
|
|
||||||
if (check_screen "locked_screen_switch_user", 5) {
|
if (check_screen "locked_screen_switch_user", 5) {
|
||||||
assert_and_click "locked_screen_switch_user";
|
assert_and_click "locked_screen_switch_user";
|
||||||
}
|
}
|
||||||
@ -276,7 +264,7 @@ sub run {
|
|||||||
|
|
||||||
# Log in with the first user account.
|
# Log in with the first user account.
|
||||||
login_user(user => "jack", password => $jackpass);
|
login_user(user => "jack", password => $jackpass);
|
||||||
check_user_logged_in("jack");
|
check_user_logged_in(user => "jack");
|
||||||
# Log out the user.
|
# Log out the user.
|
||||||
logout_user();
|
logout_user();
|
||||||
|
|
||||||
@ -289,7 +277,7 @@ sub run {
|
|||||||
# If not, we are in KDE and we will log in normally.
|
# If not, we are in KDE and we will log in normally.
|
||||||
login_user(user => "jim", password => $jimpass);
|
login_user(user => "jim", password => $jimpass);
|
||||||
}
|
}
|
||||||
check_user_logged_in("jim");
|
check_user_logged_in(user => "jim");
|
||||||
# And this time reboot the system using the menu.
|
# And this time reboot the system using the menu.
|
||||||
reboot_system();
|
reboot_system();
|
||||||
|
|
||||||
@ -307,7 +295,7 @@ sub run {
|
|||||||
# only work if we were correctly denied login with the wrong password,
|
# only work if we were correctly denied login with the wrong password,
|
||||||
# if we were let in with the wrong password it'll fail
|
# if we were let in with the wrong password it'll fail
|
||||||
login_user(user => "jim", password => $jimpass);
|
login_user(user => "jim", password => $jimpass);
|
||||||
check_user_logged_in("jim");
|
check_user_logged_in(user => "jim");
|
||||||
|
|
||||||
# Lock the screen and unlock again.
|
# Lock the screen and unlock again.
|
||||||
lock_screen();
|
lock_screen();
|
||||||
@ -315,32 +303,29 @@ sub run {
|
|||||||
login_user(user => "jim", password => $jimpass, method => "unlock");
|
login_user(user => "jim", password => $jimpass, method => "unlock");
|
||||||
|
|
||||||
# Switch user tests
|
# Switch user tests
|
||||||
if ($desktop eq "gnome") {
|
unless ($desktop eq "i3") {
|
||||||
# Because KDE at the moment (20200403) is very unreliable concerning switching the users inside
|
|
||||||
# the virtual machine, we will skip this part, until situation is better. Switching users will
|
|
||||||
# be only tested in Gnome.
|
|
||||||
|
|
||||||
# Start a terminal session to monitor on which sessions we are, when we start switching users.
|
# Start a terminal session to monitor on which sessions we are, when we start switching users.
|
||||||
# This time, we will open the terminal window manually because we want to leave it open later.
|
# This time, we will open the terminal window manually because we want to leave it open later.
|
||||||
menu_launch_type "terminal";
|
desktop_launch_terminal;
|
||||||
wait_still_screen 2;
|
wait_still_screen 2;
|
||||||
# Initiate switch user
|
# Initiate switch user
|
||||||
switch_user();
|
switch_user();
|
||||||
# Now, we get a new login screen, so let's do the login into the new session.
|
# Now, we get a new login screen, so let's do the login into the new session.
|
||||||
login_user(user => "jack", password => $jackpass);
|
login_user(user => "jack", password => $jackpass);
|
||||||
# Check that it is a new session, the terminal window should not be visible.
|
# Check that it is a new session, the terminal window should not be visible.
|
||||||
if (check_screen "user_confirm_jim") {
|
if (check_screen "apps_run_terminal") {
|
||||||
die "The session was not switched!";
|
die "The session was not switched!";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
check_user_logged_in("jack");
|
# keep the terminal open so we can check later
|
||||||
|
check_user_logged_in(user => "jack", keepterm => 1);
|
||||||
}
|
}
|
||||||
# Log out the user.
|
# Switch again.
|
||||||
logout_user();
|
switch_user();
|
||||||
# Now, let us log into the original session, this time, the terminal window
|
# Now, let us log into the original session, this time, the terminal window
|
||||||
# should still be visible.
|
# should still be visible.
|
||||||
login_user(user => "jim", password => $jimpass);
|
login_user(user => "jim", password => $jimpass);
|
||||||
assert_screen "user_confirm_jim";
|
check_user_logged_in(user => "jim", termopen => 1);
|
||||||
|
|
||||||
# We will also test another alternative - switching the user from
|
# We will also test another alternative - switching the user from
|
||||||
# a locked screen.
|
# a locked screen.
|
||||||
@ -348,7 +333,9 @@ sub run {
|
|||||||
send_key "ret";
|
send_key "ret";
|
||||||
switch_user();
|
switch_user();
|
||||||
login_user(user => "jack", password => $jackpass);
|
login_user(user => "jack", password => $jackpass);
|
||||||
check_user_logged_in("jack");
|
# we should be back in the previous 'jack' session so the terminal
|
||||||
|
# we kept open should be there
|
||||||
|
check_user_logged_in(user => "jack", termopen => 1);
|
||||||
}
|
}
|
||||||
# Power off the machine
|
# Power off the machine
|
||||||
power_off();
|
power_off();
|
||||||
|
@ -146,7 +146,7 @@ sub run {
|
|||||||
# we launch a terminal so that the top of the screen is filled with
|
# we launch a terminal so that the top of the screen is filled with
|
||||||
# something that we know and can check that it is not covered by a
|
# something that we know and can check that it is not covered by a
|
||||||
# notification popup from dunst
|
# notification popup from dunst
|
||||||
send_key('alt-ret');
|
desktop_launch_terminal;
|
||||||
assert_screen("apps_run_terminal");
|
assert_screen("apps_run_terminal");
|
||||||
assert_script_run('notify-send -t 10000 "foo"');
|
assert_script_run('notify-send -t 10000 "foo"');
|
||||||
assert_screen("i3_dunst_foo_notification", timeout => 5);
|
assert_screen("i3_dunst_foo_notification", timeout => 5);
|
||||||
|
@ -71,17 +71,11 @@ sub run {
|
|||||||
}
|
}
|
||||||
# Let's open the terminal. We will use it to start the applications
|
# Let's open the terminal. We will use it to start the applications
|
||||||
# as well as to check for the name of the printed file.
|
# as well as to check for the name of the printed file.
|
||||||
if ($desktop eq "i3") {
|
desktop_launch_terminal;
|
||||||
send_key('alt-ret');
|
|
||||||
assert_screen("apps_run_terminal");
|
assert_screen("apps_run_terminal");
|
||||||
|
wait_still_screen 3;
|
||||||
# switch to tabbed mode
|
# switch to tabbed mode
|
||||||
send_key("alt-w");
|
send_key("alt-w") if ($desktop eq "i3");
|
||||||
}
|
|
||||||
else {
|
|
||||||
menu_launch_type($term);
|
|
||||||
wait_still_screen(5);
|
|
||||||
}
|
|
||||||
|
|
||||||
# Open the text editor and maximize it.
|
# Open the text editor and maximize it.
|
||||||
wait_screen_change { type_very_safely "$editor /home/$user/testfile.txt &\n"; };
|
wait_screen_change { type_very_safely "$editor /home/$user/testfile.txt &\n"; };
|
||||||
wait_still_screen(stilltime => 2, similarity_level => 45);
|
wait_still_screen(stilltime => 2, similarity_level => 45);
|
||||||
|
@ -10,12 +10,7 @@ sub run {
|
|||||||
check_desktop;
|
check_desktop;
|
||||||
# try and avoid double-typing issues
|
# try and avoid double-typing issues
|
||||||
kde_doublek_workaround(key => 't') if ($desktop eq "kde");
|
kde_doublek_workaround(key => 't') if ($desktop eq "kde");
|
||||||
if ($desktop eq "i3") {
|
desktop_launch_terminal;
|
||||||
send_key("alt-ret");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
menu_launch_type('terminal');
|
|
||||||
}
|
|
||||||
assert_screen "apps_run_terminal";
|
assert_screen "apps_run_terminal";
|
||||||
wait_still_screen(stilltime => 5, similarity_level => 42);
|
wait_still_screen(stilltime => 5, similarity_level => 42);
|
||||||
# need to be root
|
# need to be root
|
||||||
|
@ -7,7 +7,7 @@ sub run {
|
|||||||
my $password = get_var('USER_PASSWORD', 'weakpassword');
|
my $password = get_var('USER_PASSWORD', 'weakpassword');
|
||||||
|
|
||||||
# launch a terminal first
|
# launch a terminal first
|
||||||
send_key("alt-ret");
|
desktop_launch_terminal;
|
||||||
assert_screen("apps_run_terminal");
|
assert_screen("apps_run_terminal");
|
||||||
|
|
||||||
# start blivet_gui, mousepad and check that they are split on the screen
|
# start blivet_gui, mousepad and check that they are split on the screen
|
||||||
|