From 66bd961765c2169ce56c8c7da2b321d6b4e7134e Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 20 Mar 2020 13:43:42 -0700 Subject: [PATCH] Use quit_firefox in Cockpit update tests Just doing ctrl-q breaks if we hit the 'close tabs' dialog, which seems to happen occasionally. Signed-off-by: Adam Williamson --- tests/server_cockpit_autoupdate.pm | 2 +- tests/server_cockpit_updates.pm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/server_cockpit_autoupdate.pm b/tests/server_cockpit_autoupdate.pm index 1bef71f5..08c7f748 100644 --- a/tests/server_cockpit_autoupdate.pm +++ b/tests/server_cockpit_autoupdate.pm @@ -28,7 +28,7 @@ sub run { assert_screen 'autoupdate_planned_time'; # Quit Cockpit - send_key "ctrl-q"; + quit_firefox; sleep 3; # Check that the dnf-automatic service has started diff --git a/tests/server_cockpit_updates.pm b/tests/server_cockpit_updates.pm index 1f3a6c34..40a209fc 100644 --- a/tests/server_cockpit_updates.pm +++ b/tests/server_cockpit_updates.pm @@ -47,7 +47,7 @@ sub run { # needed and if so, we will restart Firefox and login again. # if (check_screen("cockpit_updates_reconnect", 1)) { - send_key "ctrl-q"; + quit_firefox; sleep 5; start_cockpit(1); select_cockpit_update(); @@ -68,7 +68,7 @@ sub run { assert_screen 'cockpit_updates_updated'; # Switch off Cockpit - send_key "ctrl-q"; + quit_firefox; # Wait a couple of seconds for the terminal to settle down, the command was # entered incorrectly which resulted in a failure.