mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-29 09:03:08 +00:00
Fix a potential race in desktop update test
https://openqa.stg.fedoraproject.org/tests/424393 is a failure where the 'Download' [updates] button was already visible when we went to the tab. We already checked whether an 'apply' button is visible and skipped the 'refresh' click if so, but because the 'download' button is a new thing, we weren't skipping the 'refresh' click if 'download' was already visible. So in this case, even though we could already see 'download', we went ahead and clicked 'refresh'...then *immediately* started looking for 'download'. It seems that Software did not refresh and remove the 'Download' button *immediately* when we pressed 'refresh' - it left the 'Download' button visible briefly, and *in this brief window*, we clicked it. *Then* Software kinda 'noticed' we'd clicked 'Update', and it seems it just sort of throws away our click on 'Download' at that point and does the refresh. So at that point, the test thinks it's clicked 'Download' and expects to see 'Apply', but actually the 'Download' click got more or less thrown away, so the test fails, sitting at the 'Download' button. To solve this, let's just extend the existing check to skip the 'refresh' click if 'download' *or* 'apply' are already visible. There is a sort of possibility here that we could wind up downloading and installing some updates that existed and were noticed *before* we did our python3-kickstart trick, but not install the python3-kickstart update, and cause the test to fail because of that, but that doesn't seem to have happened before when we were seeing the 'update' button, so I think I'm not going to borrow trouble. If it happens, we'll deal with it I guess. The comment talks only about KDE, but clearly it can be the case that an automatic check makes the button visible on GNOME too, so let's rewrite the comment too. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
517750443e
commit
d1e7b89efd
@ -40,9 +40,9 @@ sub run {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert_and_click 'desktop_package_tool_update';
|
assert_and_click 'desktop_package_tool_update';
|
||||||
# if this is KDE and it had already noticed the notification, we
|
# depending on automatic update checks, 'apply' or 'download' may
|
||||||
# will already have the apply button at this point
|
# already be visible at this point, we may not need to refresh
|
||||||
unless (check_screen 'desktop_package_tool_update_apply', 5) {
|
unless (check_screen ['desktop_package_tool_update_apply', 'desktop_package_tool_update_download'], 5) {
|
||||||
# refresh updates
|
# refresh updates
|
||||||
assert_and_click 'desktop_package_tool_update_refresh', '', 120;
|
assert_and_click 'desktop_package_tool_update_refresh', '', 120;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user