1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2025-02-16 12:34:32 +00:00

Change owner and enable KDE user switching.

This commit is contained in:
Lukáš Růžička 2020-05-18 17:06:37 +02:00
parent fead784087
commit ab4052c398

View File

@ -54,6 +54,7 @@ sub adduser {
if ($desktop eq "gnome") {
assert_script_run "mkdir /home/$login/.config";
assert_script_run "echo 'yes' >> /home/$login/.config/gnome-initial-setup-done";
assert_script_run "chown $login:$login /home/$login/.config";
}
if ($args{termstop}) {
type_very_safely "exit\n";
@ -287,41 +288,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;