Create basic tests for Clocks.
15
needles/gnome/apps/clocks/clocks_add_city.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_add_city"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 668,
|
||||
"ypos": 352,
|
||||
"width": 32,
|
||||
"height": 19,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_add_city.png
Normal file
After Width: | Height: | Size: 88 KiB |
15
needles/gnome/apps/clocks/clocks_alarm_added.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_alarm_added"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 107,
|
||||
"ypos": 337,
|
||||
"width": 71,
|
||||
"height": 37,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_alarm_added.png
Normal file
After Width: | Height: | Size: 33 KiB |
15
needles/gnome/apps/clocks/clocks_button_alarm.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_button_alarm"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 428,
|
||||
"ypos": 42,
|
||||
"width": 47,
|
||||
"height": 18,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_button_alarm.png
Normal file
After Width: | Height: | Size: 79 KiB |
15
needles/gnome/apps/clocks/clocks_button_continue.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_button_continue"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 238,
|
||||
"ypos": 464,
|
||||
"width": 79,
|
||||
"height": 20,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_button_continue.png
Normal file
After Width: | Height: | Size: 36 KiB |
15
needles/gnome/apps/clocks/clocks_button_delete.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_button_delete"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 956,
|
||||
"ypos": 737,
|
||||
"width": 48,
|
||||
"height": 17,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_button_delete.png
Normal file
After Width: | Height: | Size: 88 KiB |
15
needles/gnome/apps/clocks/clocks_button_menu.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_button_menu"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 944,
|
||||
"ypos": 43,
|
||||
"width": 16,
|
||||
"height": 16,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_button_menu.png
Normal file
After Width: | Height: | Size: 79 KiB |
15
needles/gnome/apps/clocks/clocks_button_new.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_button_new"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 22,
|
||||
"ypos": 41,
|
||||
"width": 35,
|
||||
"height": 19,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_button_new.png
Normal file
After Width: | Height: | Size: 79 KiB |
15
needles/gnome/apps/clocks/clocks_button_pause.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_button_pause"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 410,
|
||||
"ypos": 497,
|
||||
"width": 54,
|
||||
"height": 19,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_button_pause.png
Normal file
After Width: | Height: | Size: 40 KiB |
15
needles/gnome/apps/clocks/clocks_button_reset.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_button_reset"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 400,
|
||||
"ypos": 462,
|
||||
"width": 52,
|
||||
"height": 22,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_button_reset.png
Normal file
After Width: | Height: | Size: 37 KiB |
15
needles/gnome/apps/clocks/clocks_button_start.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_button_start"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 254,
|
||||
"ypos": 463,
|
||||
"width": 48,
|
||||
"height": 20,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_button_start.png
Normal file
After Width: | Height: | Size: 32 KiB |
15
needles/gnome/apps/clocks/clocks_button_stop.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_button_stop"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 254,
|
||||
"ypos": 463,
|
||||
"width": 48,
|
||||
"height": 20,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_button_stop.png
Normal file
After Width: | Height: | Size: 35 KiB |
15
needles/gnome/apps/clocks/clocks_button_stopwatch.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_button_stopwatch"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 534,
|
||||
"ypos": 42,
|
||||
"width": 78,
|
||||
"height": 18,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_button_stopwatch.png
Normal file
After Width: | Height: | Size: 75 KiB |
15
needles/gnome/apps/clocks/clocks_button_timer.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_button_timer"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 672,
|
||||
"ypos": 42,
|
||||
"width": 44,
|
||||
"height": 17,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_button_timer.png
Normal file
After Width: | Height: | Size: 78 KiB |
15
needles/gnome/apps/clocks/clocks_check_minute.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_check_minute"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 456,
|
||||
"ypos": 365,
|
||||
"width": 97,
|
||||
"height": 56,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_check_minute.png
Normal file
After Width: | Height: | Size: 40 KiB |
15
needles/gnome/apps/clocks/clocks_check_reset.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_check_reset"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 319,
|
||||
"ypos": 367,
|
||||
"width": 54,
|
||||
"height": 50,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_check_reset.png
Normal file
After Width: | Height: | Size: 31 KiB |
15
needles/gnome/apps/clocks/clocks_check_thirty.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_check_thirty"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 325,
|
||||
"ypos": 367,
|
||||
"width": 52,
|
||||
"height": 50,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_check_thirty.png
Normal file
After Width: | Height: | Size: 37 KiB |
15
needles/gnome/apps/clocks/clocks_check_treset.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_check_treset"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 477,
|
||||
"ypos": 366,
|
||||
"width": 74,
|
||||
"height": 53,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_check_treset.png
Normal file
After Width: | Height: | Size: 34 KiB |
15
needles/gnome/apps/clocks/clocks_check_twenty.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_check_twenty"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 322,
|
||||
"ypos": 366,
|
||||
"width": 49,
|
||||
"height": 51,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_check_twenty.png
Normal file
After Width: | Height: | Size: 35 KiB |
15
needles/gnome/apps/clocks/clocks_city_added.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_city_added"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 431,
|
||||
"ypos": 351,
|
||||
"width": 125,
|
||||
"height": 22,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_city_added.png
Normal file
After Width: | Height: | Size: 84 KiB |
15
needles/gnome/apps/clocks/clocks_search_city.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_search_city"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 336,
|
||||
"ypos": 457,
|
||||
"width": 117,
|
||||
"height": 17,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_search_city.png
Normal file
After Width: | Height: | Size: 104 KiB |
16
needles/gnome/apps/clocks/clocks_select.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_select_clock",
|
||||
"clocks_select"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 901,
|
||||
"ypos": 42,
|
||||
"width": 19,
|
||||
"height": 17,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_select.png
Normal file
After Width: | Height: | Size: 86 KiB |
15
needles/gnome/apps/clocks/clocks_set_alarm.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"clocks_set_alarm"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 749,
|
||||
"ypos": 235,
|
||||
"width": 40,
|
||||
"height": 21,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
BIN
needles/gnome/apps/clocks/clocks_set_alarm.png
Normal file
After Width: | Height: | Size: 48 KiB |
42
tests/apps_startstop/gnome/clocks/add_alarm.pm
Normal 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:
|
39
tests/apps_startstop/gnome/clocks/add_clock.pm
Normal 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:
|
42
tests/apps_startstop/gnome/clocks/remove_alarm.pm
Normal 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:
|
25
tests/apps_startstop/gnome/clocks/start.pm
Normal 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:
|
37
tests/apps_startstop/gnome/clocks/stopwatch.pm
Normal 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:
|
35
tests/apps_startstop/gnome/clocks/timer.pm
Normal 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:
|