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

Compare commits

...

2 Commits

Author SHA1 Message Date
Lukáš Růžička
179764d49c Fix tests for Maps.
* Scarborough provided quite a messy map that resulted
in frequent needle failure. Changing the location
for something better to make it more reliable.
* The zoom test could have failed with a low resolution
image. Adding some timeout to the needle give more
time to load the proper image.
2022-12-07 11:52:11 +01:00
Lukáš Růžička
0cb57e7511 Add timeout 30 secs to make less fragile.
The check_screen function checks for the existing tag
but it only waits 1 second by default. In this time,
Abrt will not even start so we need to prolong
the check_screen timeout to make sure the application
has started (or at least give it enough time to try).
2022-12-07 10:00:33 +01:00
18 changed files with 43 additions and 81 deletions

View File

@ -124,7 +124,7 @@ for hashname in ("jlJmL", "7XGzO", "ps61y", "OvXj~", "GqYOp", "VEFrP"):
for info in ("home", "personal", "work"):
testliterals.append(f"contacts_label_{info}")
# Needles for Maps
for location in ("vilnius", "denali", "wellington", "scarborough", "pune"):
for location in ("vilnius", "denali", "wellington", "poysdorf", "pune"):
testliterals.append(f"maps_select_{location}")
testliterals.append(f"maps_found_{location}")
testliterals.append(f"maps_info_{location}")

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 453,
"ypos": 335,
"width": 150,
"height": 129,
"type": "match"
}
],
"properties": [],
"tags": [
"maps_found_poysdorf"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 KiB

View File

@ -1,16 +0,0 @@
{
"area": [
{
"xpos": 377,
"width": 160,
"ypos": 397,
"height": 77,
"type": "match",
"match": 90
}
],
"properties": [],
"tags": [
"maps_found_scarborough"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 746 KiB

View File

@ -1,15 +0,0 @@
{
"area": [
{
"type": "match",
"xpos": 377,
"height": 77,
"width": 160,
"ypos": 335
}
],
"properties": [],
"tags": [
"maps_found_scarborough"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 666 KiB

View File

@ -1,15 +0,0 @@
{
"area": [
{
"xpos": 377,
"ypos": 397,
"width": 160,
"height": 77,
"type": "match"
}
],
"properties": [],
"tags": [
"maps_found_scarborough"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 744 KiB

View File

@ -1,15 +0,0 @@
{
"area": [
{
"xpos": 394,
"ypos": 283,
"width": 129,
"height": 56,
"type": "match"
}
],
"properties": [],
"tags": [
"maps_info_scarborough"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 685 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 291,
"ypos": 134,
"width": 80,
"height": 34,
"type": "match"
}
],
"properties": [],
"tags": [
"maps_select_poysdorf"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

View File

@ -1,15 +0,0 @@
{
"area": [
{
"xpos": 263,
"ypos": 151,
"width": 119,
"height": 37,
"type": "match"
}
],
"properties": [],
"tags": [
"maps_select_scarborough"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 239 KiB

View File

@ -53,7 +53,7 @@ sub run {
$softfailCounter = $softfailCounter + $result;
$result = search("wellington");
$softfailCounter = $softfailCounter + $result;
$result = search("scarborough");
$result = search("poysdorf");
$softfailCounter = $softfailCounter + $result;
$result = search("pune");
$softfailCounter = $softfailCounter + $result;

View File

@ -14,7 +14,7 @@ sub run {
foreach (my @counter = (1 .. 4)) {
click_lastmatch();
}
assert_screen("maps_map_zoomed");
assert_screen("maps_map_zoomed", timeout => 60);
# Zoom out several times and check for zoomed out map.

View File

@ -9,8 +9,16 @@ sub run {
my $self = shift;
# Start the application
menu_launch_type('abrt');
# Check that it is started
unless (check_screen('abrt_runs')) {
# Check that the application has started.
# On KDE, the test failed when Abrt started
# and there was an error caught.
# Now, if we do not find the needle that
# checks Abrt has started, we will also
# check for a reported issue - if we find that
# we can assume that Abrt has started indeed.
unless (check_screen('abrt_runs', timeout => 30)) {
# The above check needs some timeout because
# it might take some time before Abrt starts.
assert_screen('abrt_runs_found_problem');
record_soft_failure("Abrt has reported issues.");
}