1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2025-02-14 03:24:32 +00:00

Create basic tests for Clocks.

This commit is contained in:
Lukas Ruzicka 2019-03-14 16:22:37 +01:00
parent 375575cd07
commit 6ae7d5cfff
50 changed files with 551 additions and 0 deletions

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"clocks_add_city"
],
"area": [
{
"xpos": 668,
"ypos": 352,
"width": 32,
"height": 19,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"clocks_alarm_added"
],
"area": [
{
"xpos": 107,
"ypos": 337,
"width": 71,
"height": 37,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"clocks_button_alarm"
],
"area": [
{
"xpos": 428,
"ypos": 42,
"width": 47,
"height": 18,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"clocks_button_continue"
],
"area": [
{
"xpos": 238,
"ypos": 464,
"width": 79,
"height": 20,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"clocks_button_delete"
],
"area": [
{
"xpos": 956,
"ypos": 737,
"width": 48,
"height": 17,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"clocks_button_menu"
],
"area": [
{
"xpos": 944,
"ypos": 43,
"width": 16,
"height": 16,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"clocks_button_new"
],
"area": [
{
"xpos": 22,
"ypos": 41,
"width": 35,
"height": 19,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"clocks_button_pause"
],
"area": [
{
"xpos": 410,
"ypos": 497,
"width": 54,
"height": 19,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"clocks_button_reset"
],
"area": [
{
"xpos": 400,
"ypos": 462,
"width": 52,
"height": 22,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"clocks_button_start"
],
"area": [
{
"xpos": 254,
"ypos": 463,
"width": 48,
"height": 20,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"clocks_button_stop"
],
"area": [
{
"xpos": 254,
"ypos": 463,
"width": 48,
"height": 20,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"clocks_button_stopwatch"
],
"area": [
{
"xpos": 534,
"ypos": 42,
"width": 78,
"height": 18,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"clocks_button_timer"
],
"area": [
{
"xpos": 672,
"ypos": 42,
"width": 44,
"height": 17,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"clocks_check_minute"
],
"area": [
{
"xpos": 456,
"ypos": 365,
"width": 97,
"height": 56,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"clocks_check_reset"
],
"area": [
{
"xpos": 319,
"ypos": 367,
"width": 54,
"height": 50,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"clocks_check_thirty"
],
"area": [
{
"xpos": 325,
"ypos": 367,
"width": 52,
"height": 50,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"clocks_check_treset"
],
"area": [
{
"xpos": 477,
"ypos": 366,
"width": 74,
"height": 53,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"clocks_check_twenty"
],
"area": [
{
"xpos": 322,
"ypos": 366,
"width": 49,
"height": 51,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"clocks_city_added"
],
"area": [
{
"xpos": 431,
"ypos": 351,
"width": 125,
"height": 22,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"clocks_search_city"
],
"area": [
{
"xpos": 336,
"ypos": 457,
"width": 117,
"height": 17,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

View File

@ -0,0 +1,16 @@
{
"properties": [],
"tags": [
"clocks_select_clock",
"clocks_select"
],
"area": [
{
"xpos": 901,
"ypos": 42,
"width": 19,
"height": 17,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"clocks_set_alarm"
],
"area": [
{
"xpos": 749,
"ypos": 235,
"width": 40,
"height": 21,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -0,0 +1,42 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# Add and remove alarm in the Clocks application.
sub run {
my $self = shift;
# Click on Alarm
assert_and_click 'clocks_button_alarm';
assert_and_click 'clocks_button_new';
wait_still_screen 2;
# Set alarm to some time and name it
type_very_safely '07';
send_key 'tab';
type_very_safely '28';
send_key 'tab';
type_very_safely 'MyAlarm';
assert_and_click 'clocks_set_alarm';
wait_still_screen 2;
# Test that it was added.
assert_screen 'clocks_alarm_added';
# Select alarm
assert_and_click 'clocks_select';
assert_and_click 'clocks_alarm_added';
# Remove alarm
assert_and_click 'clocks_button_delete';
wait_still_screen 2;
# Test that it was removed.
die "Alarm was not removed!" if (check_screen 'clocks_alarm_added', 1)
}
sub test_flags {
return {always_rollback => 1};
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,39 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# Add and remove new world clock in the application.
sub run {
my $self = shift;
# Add a new clock
# Click on New
assert_and_click 'clocks_button_new';
wait_still_screen 2;
# Write a location to add and select it
type_very_safely 'alexandria';
assert_and_click 'clocks_search_city';
assert_and_click 'clocks_add_city';
# Test that it was added.
assert_screen 'clocks_city_added';
# Remove the new clock
# Click on selection button
assert_and_click 'clocks_select';
# Select previously added clock
assert_and_click 'clocks_city_added';
# Delete it
assert_and_click 'clocks_button_delete';
# Check that it disappeared
die "The clock has not been deleted!" if (check_screen 'clocks_city_added', 1);
}
sub test_flags {
return {always_rollback => 1};
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,42 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# Add and remove alarm in the Clocks application.
sub run {
my $self = shift;
# Click on Alarm
assert_and_click 'clocks_button_alarm';
assert_and_click 'clocks_button_new';
wait_still_screen 2;
# Set alarm to some time and name it
type_very_safely '07';
send_key 'tab';
type_very_safely '28';
send_key 'tab';
type_very_safely 'MyAlarm';
assert_and_click 'clocks_set_alarm';
wait_still_screen 2;
# Test that it was added.
assert_screen 'clocks_alarm_added';
# Select alarm
assert_and_click 'clocks_select';
assert_and_click 'clocks_alarm_added';
# Remove alarm
assert_and_click 'clocks_button_delete';
wait_still_screen 2;
# Test that it was removed.
die "Alarm was not removed!" if (check_screen 'clocks_alarm_added', 1)
}
sub test_flags {
return {always_rollback => 1};
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,25 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This test checks that Clocks starts.
sub run {
my $self = shift;
# Start the application
start_with_launcher('apps_menu_clocks');
# give access rights if asked
if (check_screen('apps_run_access', 1)) {
assert_and_click 'apps_run_access';
}
assert_screen 'apps_run_clocks';
}
sub test_flags {
return {fatal => 1, milestone => 1};
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,37 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# Use stopwatch.
sub run {
my $self = shift;
# Click on Stopwatch
assert_and_click 'clocks_button_stopwatch';
wait_still_screen 2;
# Start stopwatch
assert_and_click 'clocks_button_start';
sleep 20;
assert_and_click 'clocks_button_stop';
# Check that the stopwatch has run
assert_screen 'clocks_check_twenty';
# Continue stopwatch
assert_and_click 'clocks_button_continue';
sleep 10;
assert_and_click 'clocks_button_stop';
# Check that it has run
assert_screen 'clocks_check_thirty';
# Reset the stopwatch
assert_and_click 'clocks_button_reset';
assert_screen 'clocks_check_reset';
}
sub test_flags {
return {always_rollback => 1};
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,35 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# Use Timer.
sub run {
my $self = shift;
# Click on Timer
assert_and_click 'clocks_button_stopwatch';
wait_still_screen 2;
# Start timer
assert_and_click 'clocks_button_start';
sleep 40;
assert_and_click 'clocks_button_pause';
# Check that the timer has run
assert_screen 'clocks_check_minute';
# Wait some time to see that the timer waits
sleep 40;
assert_screen 'clocks_check_minute';
# Reset the timer
assert_and_click 'clocks_button_reset';
assert_screen 'clocks_check_treset';
}
sub test_flags {
return {always_rollback => 1};
}
1;
# vim: set sw=4 et: