1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-12-22 02:13:08 +00:00

Handle Firefox 100 disappearing scrollbars in Cockpit update test

The Cockpit update test relies on scrolling the Cockpit left bar
to find the Software Updates page, but in Firefox 100, the scroll
bars disappear shortly after the last time you moved the mouse.
To deal with this, instead of looking for a scroll bar to scroll,
we'll click the search box in the left bar and hit 'up' to scroll
it to the bottom.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2022-05-03 13:15:02 -07:00
parent 241ab275a6
commit 05af76265f
5 changed files with 24 additions and 17 deletions

View File

@ -37,9 +37,16 @@ sub start_cockpit {
sub select_cockpit_update {
# This method navigates to to the updates screen
assert_screen ["cockpit_software_updates", "cockpit_leftbar_scroll"], 120;
# From Firefox 100 on, we get 'adaptive scrollbars', which means
# the scrollbar is just invisible unless you moved the mouse
# recently. So we click in the search box and hit 'up' to scroll
# the sidebar to the bottom if necessary
assert_screen ["cockpit_software_updates", "cockpit_search"], 120;
click_lastmatch;
assert_and_click "cockpit_software_updates" if (match_has_tag "cockpit_leftbar_scroll");
if (match_has_tag "cockpit_search") {
send_key "up";
assert_and_click "cockpit_software_updates";
}
# wait for the updates to download
assert_screen 'cockpit_updates_check', 300;
}

View File

@ -1,15 +0,0 @@
{
"area": [
{
"height": 55,
"type": "match",
"width": 43,
"xpos": 196,
"ypos": 711
}
],
"properties": [],
"tags": [
"cockpit_leftbar_scroll"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"height": 20,
"ypos": 210,
"width": 18,
"type": "match",
"xpos": 31
}
],
"properties": [],
"tags": [
"cockpit_search"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB