mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-21 21:43:08 +00:00
Robustify the scrolling in the Help app test
This keeps failing on the accessibility section, and looking at the screenshots I realized why. When you press 'down', GNOME doesn't just 'snap' to the new view, it does a smooth downward scroll. We're often matching *while it's scrolling*, so the needle match is right at the bottom of the screen. But then the animation continues, so when we get to the click action (even though we use click_lastmatch it's not *instant* in openQA), the thing we're trying to click (the "Accessibility" section title) is a bit further up the screen, and the click 'misses'. So, we need to wait out the scroll then re-assert and click. This unfortunately will make the test take about 30 seconds longer, but I don't see another way to do it. We could maybe shave the wait_still_screen to one second... Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
651590f3df
commit
0f781bdaf2
@ -10,7 +10,12 @@ use utils;
|
|||||||
sub visit_section {
|
sub visit_section {
|
||||||
my $section = shift;
|
my $section = shift;
|
||||||
send_key_until_needlematch("help_section_$section", "down", 40, 1);
|
send_key_until_needlematch("help_section_$section", "down", 40, 1);
|
||||||
click_lastmatch();
|
# we have to wait then re-assert, because the down movement is
|
||||||
|
# animated, so we may match while it's still animating and then
|
||||||
|
# when the animation is complete the section title may be in a
|
||||||
|
# different place to where we first saw it
|
||||||
|
wait_still_screen 2;
|
||||||
|
assert_and_click("help_section_$section");
|
||||||
assert_screen("help_section_content_$section");
|
assert_screen("help_section_content_$section");
|
||||||
assert_and_click("help_breadcrumbs_home");
|
assert_and_click("help_breadcrumbs_home");
|
||||||
assert_screen("help_main_screen");
|
assert_screen("help_main_screen");
|
||||||
|
Loading…
Reference in New Issue
Block a user