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

Enable User Switching for KDE, too

This commit is contained in:
Lukáš Růžička 2020-05-18 16:42:19 +02:00
parent 61f845dbbf
commit df18a414ae

View File

@ -287,41 +287,37 @@ sub run {
login_user(user=>"jim", password=>$jimpass, method=>"unlock");
# Switch user tests
if ($desktop eq "gnome") {
# 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.
# This time, we will open the terminal window manually because we want to leave it open later.
menu_launch_type "terminal";
wait_still_screen 2;
# Initiate switch user
switch_user();
# Now, we get a new login screen, so let's do the login into the new session.
login_user(user=>"jack", password=>$jackpass);
# Check that it is a new session, the terminal window should not be visible.
if (check_screen "user_confirm_jim") {
die "The session was not switched!";
}
else {
check_user_logged_in("jack");
}
# Log out the user.
logout_user();
# Now, let us log into the original session, this time, the terminal window
# should still be visible.
login_user(user=>"jim", password=>$jimpass);
assert_screen "user_confirm_jim";
# We will also test another alternative - switching the user from
# a locked screen.
lock_screen();
send_key "ret";
switch_user();
login_user(user=>"jack", password=>$jackpass);
# 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.
menu_launch_type "terminal";
wait_still_screen 2;
# Initiate switch user
switch_user();
# Now, we get a new login screen, so let's do the login into the new session.
login_user(user=>"jack", password=>$jackpass);
# Check that it is a new session, the terminal window should not be visible.
if (check_screen "user_confirm_jim") {
die "The session was not switched!";
}
else {
check_user_logged_in("jack");
}
# Log out the user.
logout_user();
# Now, let us log into the original session, this time, the terminal window
# should still be visible.
login_user(user=>"jim", password=>$jimpass);
assert_screen "user_confirm_jim";
# We will also test another alternative - switching the user from
# a locked screen.
lock_screen();
send_key "ret";
switch_user();
login_user(user=>"jack", password=>$jackpass);
check_user_logged_in("jack");
# Power off the machine
power_off();
check_shutdown;