diff --git a/needles/gnome/locked_screen_switch_user-20200422.json b/needles/gnome/locked_screen_switch_user-20200422.json new file mode 100644 index 00000000..fd0085d0 --- /dev/null +++ b/needles/gnome/locked_screen_switch_user-20200422.json @@ -0,0 +1,15 @@ +{ + "properties": [], + "tags": [ + "locked_screen_switch_user" + ], + "area": [ + { + "xpos": 964, + "ypos": 709, + "width": 21, + "height": 19, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/gnome/locked_screen_switch_user-20200422.png b/needles/gnome/locked_screen_switch_user-20200422.png new file mode 100644 index 00000000..8a5eda81 Binary files /dev/null and b/needles/gnome/locked_screen_switch_user-20200422.png differ diff --git a/tests/desktop_login.pm b/tests/desktop_login.pm index 54ad8e2e..281d7f91 100644 --- a/tests/desktop_login.pm +++ b/tests/desktop_login.pm @@ -139,7 +139,11 @@ sub logout_user { sub switch_user { # Switch the user, i.e. leave the current user logged in and # log in another user simultaneously. - if (check_screen "system_menu_button") { + send_key "ret"; + if (check_screen "locked_screen_switch_user") { + assert_and_click "locked_screen_switch_user"; + } + elsif (check_screen "system_menu_button") { # The system_menu_button indicates that we are in an active # and unlocked session, where user switching differs # from a locked but active session. @@ -150,10 +154,6 @@ sub switch_user { # Add sleep to slow down the process a bit sleep 10; } - else { - # When the screen is locked, use the icon. - assert_and_click "locked_screen_switch_user"; - } } sub reboot_system {