From a4867ebe765a988fe850d97a4d4b195ee606f9b8 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: May 06 2021 16:52:13 +0000 Subject: desktop_login: use esc not alt-f4 to dismiss menu on KDE alt-f4 makes sense for an app (Terminal on GNOME) but not really for closing the system menu (KDE). It seems like it worked till a day or two back then broke, but I think just using Esc instead rather than filing a bug is the best plan, I'm not sure I'd *expect* alt-f4 to work for this. Signed-off-by: Adam Williamson --- diff --git a/tests/desktop_login.pm b/tests/desktop_login.pm index b436e19..b659f9c 100644 --- a/tests/desktop_login.pm +++ b/tests/desktop_login.pm @@ -95,6 +95,7 @@ sub login_user { sub check_user_logged_in { # Performs a check that a correct user has been locked in. my $user = shift; + my $exitkey; # In Gnome, the name of the user was accessible through menu # in the upper right corner, but apparently it has been removed. # Reading the login name from the terminal prompt seems to be @@ -102,14 +103,16 @@ sub check_user_logged_in { if ($desktop eq "gnome") { menu_launch_type $term; wait_still_screen 2; + $exitkey = "alt-f4"; } # 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 "alt-f4"; + send_key $exitkey; wait_still_screen 5; }