Tweak desktop update matching logic

This gives apply and download longer to show up (which is an
issue for KDE right now) while also not waiting 10 seconds if
they don't.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2021-02-25 14:33:17 -08:00
parent 7c6188c087
commit de36bd2d12

View File

@ -46,10 +46,8 @@ sub run {
assert_and_click 'desktop_package_tool_update'; assert_and_click 'desktop_package_tool_update';
# depending on automatic update checks, 'apply' or 'download' may # depending on automatic update checks, 'apply' or 'download' may
# already be visible at this point, we may not need to refresh # already be visible at this point, we may not need to refresh
unless (check_screen ['desktop_package_tool_update_apply', 'desktop_package_tool_update_download'], 10) { assert_screen ['desktop_package_tool_update_apply', 'desktop_package_tool_update_download', 'desktop_package_tool_update_refresh'], 120;
# refresh updates click_lastmatch if (match_has_tag "desktop_package_tool_update_refresh");
assert_and_click('desktop_package_tool_update_refresh', timeout=>120);
}
# wait for refresh, then apply updates, moving the mouse every two # wait for refresh, then apply updates, moving the mouse every two
# minutes to avoid the idle screen blank kicking in. Depending on # minutes to avoid the idle screen blank kicking in. Depending on
# whether this is KDE or GNOME and what Fedora release, we may see # whether this is KDE or GNOME and what Fedora release, we may see