diff --git a/tests/desktop_login.pm b/tests/desktop_login.pm index 2a5ef3f0..a69e03da 100644 --- a/tests/desktop_login.pm +++ b/tests/desktop_login.pm @@ -287,41 +287,36 @@ 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;