mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-24 23:03:08 +00:00
Tweak desktop_printing launch/maximize a bit to make more robust
We seem to be having quite a few failures lately because the viewer window in KDE never got maximized. This makes us a bit more conservative at startup and puts the maximization / sentence check in a send_key_until_needlematch loop to give it more chances. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
7955c092d6
commit
ec34439004
@ -144,15 +144,23 @@ sub run {
|
|||||||
# Enter key will dismiss them and return the CLI to the ready status.
|
# Enter key will dismiss them and return the CLI to the ready status.
|
||||||
send_key("ret");
|
send_key("ret");
|
||||||
# Open the pdf file in a Document reader and check that it is correctly printed.
|
# Open the pdf file in a Document reader and check that it is correctly printed.
|
||||||
type_safely("$viewer $filepath &\n");
|
wait_screen_change { type_safely("$viewer $filepath &\n"); };
|
||||||
wait_still_screen(stilltime => 3, similarity_level => 45);
|
wait_still_screen(stilltime => 3, similarity_level => 45);
|
||||||
# Resize the window, so that the size of the document fits the bigger space
|
# Maximize the screen and check the printed pdf, giving it a few
|
||||||
# and gets more readable.
|
# chances to work
|
||||||
send_key $maximize if (defined($maximize));
|
my $count = 5;
|
||||||
wait_still_screen(stilltime => 2, similarity_level => 45);
|
while ($count) {
|
||||||
send_key "ctrl-home" if ($desktop eq "kde");
|
$count -= 1;
|
||||||
# Check the printed pdf.
|
send_key($maximize);
|
||||||
assert_screen "printing_check_sentence";
|
wait_still_screen(stilltime => 3, similarity_level => 45);
|
||||||
|
if ($desktop eq "kde") {
|
||||||
|
# ensure we're at the start of the document
|
||||||
|
send_key "ctrl-home";
|
||||||
|
wait_still_screen(stilltime => 2, similarity_level => 45);
|
||||||
|
}
|
||||||
|
last if (check_screen("printing_check_sentence", 3));
|
||||||
|
}
|
||||||
|
assert_screen("printing_check_sentence", 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user