1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-28 08:33:08 +00:00

desktop_update_graphical: explicitly check refresh on GNOME

OK, this is annoying. GNOME Software intentionally does *not*
clear the 'download' or 'reboot and update' button when you hit
the refresh button, it just leaves them sitting there while the
refresh happens. So let's specifically require the 'refreshing'
text to appear and go away before we try and click on download
or apply.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2022-03-18 11:53:34 -07:00
parent 4dab8520b0
commit 06c66dcd30
7 changed files with 68 additions and 2 deletions

View File

@ -0,0 +1,16 @@
{
"area": [
{
"type": "match",
"ypos": 41,
"width": 30,
"height": 28,
"xpos": 10
}
],
"properties": [],
"tags": [
"DESKTOP-gnome",
"desktop_package_tool_update_refreshing"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

View File

@ -0,0 +1,16 @@
{
"area": [
{
"type": "match",
"height": 27,
"width": 30,
"ypos": 42,
"xpos": 10
}
],
"properties": [],
"tags": [
"DESKTOP-gnome",
"desktop_package_tool_update_refreshing"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -0,0 +1,16 @@
{
"area": [
{
"xpos": 9,
"height": 27,
"width": 30,
"ypos": 42,
"type": "match"
}
],
"properties": [],
"tags": [
"DESKTOP-gnome",
"desktop_package_tool_update_refreshing"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

@ -59,8 +59,26 @@ sub run {
wait_still_screen 5, 90; wait_still_screen 5, 90;
# we always want to refresh to make sure we get the prepared update # we always want to refresh to make sure we get the prepared update
assert_and_click 'desktop_package_tool_update_refresh', timeout=>120; assert_and_click 'desktop_package_tool_update_refresh', timeout=>120;
# wait a while to make sure the UI clears to a 'refreshing' state # for GNOME, the apply/download buttons remain visible for a long
sleep 20; # time, annoyingly. So let's actually watch the 'refreshing' state
# till it goes away
if ($desktop eq 'gnome') {
assert_screen 'desktop_package_tool_update_refreshing';
# now wait for it to go away
for my $n (1..30) {
last unless (check_screen 'desktop_package_tool_update_refreshing', 6);
# if we matched, we likely matched *immediately*, so sleep
# the other five seconds
sleep 5;
}
sleep 3;
}
else {
# just wait a bit to make sure the UI clears to a 'refreshing'
# state
sleep 5;
}
my $tags = ['desktop_package_tool_update_download', 'desktop_package_tool_update_apply']; my $tags = ['desktop_package_tool_update_download', 'desktop_package_tool_update_apply'];
# Apply updates, moving the mouse every two minutes to avoid the # Apply updates, moving the mouse every two minutes to avoid the
# idle screen blank kicking in. Depending on whether this is KDE # idle screen blank kicking in. Depending on whether this is KDE