From e396341f314c17fbe5f45162ab012d3070f07a78 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 26 Mar 2019 12:30:47 -0700 Subject: [PATCH] Handle 'authentication required' appearing on Boxes startup In the last few weeks Boxes is showing an auth dialog on start. I've filed a bug on this; let's have the test handle it as a soft failure, since this isn't a fatal problem. Do this by making an existing needle for this dialog a bit more generic in name and using it. Signed-off-by: Adam Williamson --- ...d-20190212.json => auth_required-20190212.json} | 4 ++-- ...red-20190212.png => auth_required-20190212.png} | Bin ...pdate_auth_required.json => auth_required.json} | 4 ++-- ..._update_auth_required.png => auth_required.png} | Bin tests/apps_startstop/gnome/boxes.pm | 13 +++++++++++-- tests/desktop_update_graphical.pm | 2 +- 6 files changed, 16 insertions(+), 7 deletions(-) rename needles/gnome/{desktop_update_auth_required-20190212.json => auth_required-20190212.json} (78%) rename needles/gnome/{desktop_update_auth_required-20190212.png => auth_required-20190212.png} (100%) rename needles/gnome/{desktop_update_auth_required.json => auth_required.json} (78%) rename needles/gnome/{desktop_update_auth_required.png => auth_required.png} (100%) diff --git a/needles/gnome/desktop_update_auth_required-20190212.json b/needles/gnome/auth_required-20190212.json similarity index 78% rename from needles/gnome/desktop_update_auth_required-20190212.json rename to needles/gnome/auth_required-20190212.json index 8b7375c6..7853af61 100644 --- a/needles/gnome/desktop_update_auth_required-20190212.json +++ b/needles/gnome/auth_required-20190212.json @@ -11,6 +11,6 @@ "properties": [], "tags": [ "DESKTOP-gnome", - "desktop_update_auth_required" + "auth_required" ] -} \ No newline at end of file +} diff --git a/needles/gnome/desktop_update_auth_required-20190212.png b/needles/gnome/auth_required-20190212.png similarity index 100% rename from needles/gnome/desktop_update_auth_required-20190212.png rename to needles/gnome/auth_required-20190212.png diff --git a/needles/gnome/desktop_update_auth_required.json b/needles/gnome/auth_required.json similarity index 78% rename from needles/gnome/desktop_update_auth_required.json rename to needles/gnome/auth_required.json index 44c49b10..add8e922 100644 --- a/needles/gnome/desktop_update_auth_required.json +++ b/needles/gnome/auth_required.json @@ -11,6 +11,6 @@ "properties": [], "tags": [ "DESKTOP-gnome", - "desktop_update_auth_required" + "auth_required" ] -} \ No newline at end of file +} diff --git a/needles/gnome/desktop_update_auth_required.png b/needles/gnome/auth_required.png similarity index 100% rename from needles/gnome/desktop_update_auth_required.png rename to needles/gnome/auth_required.png diff --git a/tests/apps_startstop/gnome/boxes.pm b/tests/apps_startstop/gnome/boxes.pm index add1fcf3..e49867a9 100644 --- a/tests/apps_startstop/gnome/boxes.pm +++ b/tests/apps_startstop/gnome/boxes.pm @@ -10,8 +10,17 @@ sub run { # Start the application start_with_launcher('apps_menu_boxes'); - # Check that is started - assert_screen 'apps_run_boxes'; + # handling 'auth required' screen appearing as a soft fail, + # check that is started + # https://bugzilla.redhat.com/show_bug.cgi?id=1692972 + assert_screen ['apps_run_boxes', 'auth_required']; + if (match_has_tag 'auth_required') { + record_soft_failure "Firewall authentication screen appeared - RHBZ #1692972"; + my $user_password = get_var("USER_PASSWORD") || "weakpassword"; + type_very_safely $user_password; + send_key 'ret'; + assert_screen 'apps_run_boxes'; + } # Close the application quit_with_shortcut(); diff --git a/tests/desktop_update_graphical.pm b/tests/desktop_update_graphical.pm index 51169754..e442cb03 100644 --- a/tests/desktop_update_graphical.pm +++ b/tests/desktop_update_graphical.pm @@ -27,7 +27,7 @@ sub run { else { # work around https://gitlab.gnome.org/GNOME/gnome-software/issues/582 # if it happens - if (check_screen "desktop_update_auth_required", 10) { + if (check_screen "auth_required", 10) { record_soft_failure "spurious 'auth required' - https://gitlab.gnome.org/GNOME/gnome-software/issues/582"; # bit sloppy but correct for both... type_safely "weakpassword\n";