diff --git a/needles/gnome/desktop_package_tool_uptodate.json b/needles/gnome/desktop_package_tool_uptodate.json new file mode 100644 index 00000000..b34a010f --- /dev/null +++ b/needles/gnome/desktop_package_tool_uptodate.json @@ -0,0 +1,16 @@ +{ + "area": [ + { + "ypos": 366, + "type": "match", + "width": 91, + "height": 77, + "xpos": 471 + } + ], + "properties": [], + "tags": [ + "DESKTOP-gnome", + "desktop_package_tool_uptodate" + ] +} diff --git a/needles/gnome/desktop_package_tool_uptodate.png b/needles/gnome/desktop_package_tool_uptodate.png new file mode 100644 index 00000000..c851f0f2 Binary files /dev/null and b/needles/gnome/desktop_package_tool_uptodate.png differ diff --git a/tests/desktop_update_graphical.pm b/tests/desktop_update_graphical.pm index b9dba853..28cc48ab 100644 --- a/tests/desktop_update_graphical.pm +++ b/tests/desktop_update_graphical.pm @@ -46,7 +46,27 @@ sub run { # refresh updates assert_and_click 'desktop_package_tool_update_refresh', '', 120; } - for my $n (1..5) { + # wait for refresh, then apply updates, using a C-style loop so we + # can reset it if needed due to RHBZ #1314991. We will retry a max + # of two times if we hit refresh and wind up being told the system + # is up to date. + my $retries = 2; + for (my $n = 1; $n < 6; $n++) { + # TEST TEST Check if refresh completes and g-s thinks we're + # up-to-date, if so, refresh and restart the loop + if (check_screen 'desktop_package_tool_uptodate', 1) { + if ($retries == 2) { + record_soft_failure "Refresh did not find available update - #1638563. Retrying"; + } + if ($retries > 0) { + assert_and_click 'desktop_package_tool_update_refresh'; + $n = 1; + } + else { + die "Retried refresh too many times, giving up"; + } + $retries -= 1; + } last if (check_screen 'desktop_package_tool_update_apply', 120); mouse_set 10, 10; mouse_hide;