Create a test suite for application start stop testing.

Merges #86
Fixes #85
This commit is contained in:
Lukas Ruzicka 2018-12-18 13:07:37 +01:00 committed by Adam Williamson
parent c6fac00698
commit 39d3427471
245 changed files with 2595 additions and 1 deletions

View File

@ -7,7 +7,7 @@ use Exporter;
use lockapi;
use testapi;
our @EXPORT = qw/run_with_error_check type_safely type_very_safely desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type start_cockpit repo_setup gnome_initial_setup anaconda_create_user check_desktop_clean download_modularity_tests quit_firefox advisory_get_installed_packages advisory_check_nonmatching_packages/;
our @EXPORT = qw/run_with_error_check type_safely type_very_safely desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type start_cockpit repo_setup gnome_initial_setup anaconda_create_user check_desktop_clean download_modularity_tests quit_firefox advisory_get_installed_packages advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut/;
sub run_with_error_check {
my ($func, $error_screen) = @_;
@ -645,6 +645,50 @@ sub quit_firefox {
console_login(user=>'root');
}
sub start_with_launcher {
# Get the name of the needle with a launcher, find the launcher in the menu
# and click on it to start the application.
# $launcher holds the launcher needle, but some of the apps are hidden in a submenu
# so this must be handled first to find the launcher needle.
my ($launcher,$submenu) = @_;
$submenu //= '';
my $screen_to_check = $submenu || $launcher;
# Start the Activities page
send_key 'alt-f1';
wait_still_screen 5;
# Click on the menu icon to come into the menus
assert_and_click 'apps_activities';
wait_still_screen 5;
# Find the application launcher in the current menu page.
# If it cannot be found there, hit PageDown to go to another page.
send_key_until_needlematch($screen_to_check, 'pgdn', 5, 3);
# If there was a submenu, click on that first.
if ($submenu) {
assert_and_click $submenu;
wait_still_screen 5;
}
# Click on the launcher
assert_and_click $launcher;
wait_still_screen 5;
}
sub quit_with_shortcut {
# Quit the application using the Alt-F4 keyboard shortcut
send_key 'alt-f4';
wait_still_screen 5;
assert_screen 'workspace';
}
sub advisory_get_installed_packages {
# For update tests (this only works if we've been through
# _repo_setup_updates), figure out which packages from the update

19
main.pm
View File

@ -18,6 +18,7 @@ use strict;
use testapi;
use autotest;
use needle;
use File::Basename;
# distribution-specific implementations of expected methods
my $distri = testapi::get_var("CASEDIR") . '/lib/fedoradistribution.pm';
@ -323,6 +324,8 @@ sub load_postinstall_tests() {
if (get_var("STORE_HDD_1") || get_var("PUBLISH_HDD_1")) {
autotest::loadtest "tests/_console_shutdown.pm";
}
}
## LOADING STARTS HERE
@ -350,6 +353,22 @@ if (!get_var("ENTRYPOINT")) {
load_postinstall_tests;
}
# load application start-stop tests
if (get_var("STARTSTOP")) {
my $desktop = get_var('DESKTOP');
my $casedir = get_var('CASEDIR');
# Find all tests from a directory defined by the DESKTOP variable
my @apptests = glob "${casedir}/tests/apps_startstop/${desktop}/*.pm";
# Load the terminal test extra, because it must run first for settings.
autotest::loadtest "tests/apps_startstop/${desktop}/terminal.pm";
# Load all desktop tests
foreach my $filepath (@apptests) {
my $file = basename($filepath);
autotest::loadtest "tests/apps_startstop/${desktop}/${file}";
}
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_run_cheese"
],
"area": [
{
"xpos": 116,
"ypos": 5,
"width": 52,
"height": 19,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_abrt"
],
"area": [
{
"xpos": 219,
"ypos": 304,
"width": 30,
"height": 43,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_archiver"
],
"area": [
{
"xpos": 207,
"ypos": 325,
"width": 42,
"height": 30,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_boxes"
],
"area": [
{
"xpos": 210,
"ypos": 161,
"width": 47,
"height": 44,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"ypos": 158,
"type": "match",
"width": 52,
"height": 54,
"xpos": 207
}
],
"properties": [],
"tags": [
"apps_menu_boxes"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_calculator"
],
"area": [
{
"xpos": 347,
"ypos": 162,
"width": 51,
"height": 48,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_calendar"
],
"area": [
{
"xpos": 492,
"ypos": 167,
"width": 40,
"height": 38,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_chars"
],
"area": [
{
"xpos": 365,
"ypos": 325,
"width": 20,
"height": 31,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_cheese"
],
"area": [
{
"xpos": 622,
"ypos": 156,
"width": 44,
"height": 51,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_clocks"
],
"area": [
{
"xpos": 770,
"ypos": 167,
"width": 40,
"height": 35,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"type": "match",
"width": 45,
"height": 49,
"xpos": 766,
"ypos": 159
}
],
"properties": [],
"tags": [
"apps_menu_clocks"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_contacts"
],
"area": [
{
"xpos": 218,
"ypos": 305,
"width": 36,
"height": 38,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_disks"
],
"area": [
{
"xpos": 632,
"ypos": 315,
"width": 39,
"height": 24,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 631,
"ypos": 305,
"width": 40,
"height": 51,
"type": "match"
}
],
"tags": [
"apps_menu_disks"
],
"properties": []
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_diskusage"
],
"area": [
{
"xpos": 485,
"ypos": 317,
"width": 52,
"height": 29,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_documents"
],
"area": [
{
"xpos": 491,
"ypos": 298,
"width": 36,
"height": 47,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_dviewer"
],
"area": [
{
"xpos": 349,
"ypos": 303,
"width": 44,
"height": 39,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_evolution"
],
"area": [
{
"xpos": 621,
"ypos": 313,
"width": 47,
"height": 33,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_files"
],
"area": [
{
"xpos": 771,
"ypos": 303,
"width": 36,
"height": 48,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_firefox"
],
"area": [
{
"xpos": 213,
"ypos": 443,
"width": 41,
"height": 45,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_fonts"
],
"area": [
{
"xpos": 765,
"ypos": 303,
"width": 53,
"height": 54,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_help"
],
"area": [
{
"xpos": 212,
"ypos": 450,
"width": 44,
"height": 39,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_imageviewer"
],
"area": [
{
"xpos": 349,
"ypos": 445,
"width": 35,
"height": 36,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_lcalc"
],
"area": [
{
"xpos": 348,
"ypos": 456,
"width": 48,
"height": 40,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_ldraw"
],
"area": [
{
"xpos": 488,
"ypos": 451,
"width": 48,
"height": 46,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_limpress"
],
"area": [
{
"xpos": 628,
"ypos": 453,
"width": 46,
"height": 40,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_logs"
],
"area": [
{
"xpos": 495,
"ypos": 443,
"width": 43,
"height": 45,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"type": "match",
"height": 45,
"xpos": 483,
"ypos": 442,
"width": 43
}
],
"properties": [],
"tags": [
"apps_menu_logs"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_lwriter"
],
"area": [
{
"xpos": 766,
"ypos": 455,
"width": 47,
"height": 38,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_maps"
],
"area": [
{
"xpos": 217,
"ypos": 575,
"width": 33,
"height": 48,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

@ -0,0 +1,15 @@
{
"tags": [
"apps_menu_maps"
],
"properties": [],
"area": [
{
"xpos": 761,
"ypos": 446,
"width": 58,
"height": 37,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_monitor"
],
"area": [
{
"xpos": 763,
"ypos": 449,
"width": 54,
"height": 46,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_photos"
],
"area": [
{
"xpos": 344,
"ypos": 583,
"width": 53,
"height": 37,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

@ -0,0 +1,15 @@
{
"tags": [
"apps_menu_photos"
],
"properties": [],
"area": [
{
"xpos": 203,
"ypos": 590,
"width": 58,
"height": 37,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_rhythmbox"
],
"area": [
{
"xpos": 488,
"ypos": 576,
"width": 47,
"height": 59,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_scan"
],
"area": [
{
"xpos": 765,
"ypos": 575,
"width": 45,
"height": 50,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_screenshot"
],
"area": [
{
"xpos": 632,
"ypos": 446,
"width": 40,
"height": 44,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_settings"
],
"area": [
{
"xpos": 634,
"ypos": 583,
"width": 37,
"height": 37,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 KiB

View File

@ -0,0 +1,15 @@
{
"tags": [
"apps_menu_software"
],
"properties": [],
"area": [
{
"xpos": 770,
"ypos": 588,
"width": 38,
"height": 30,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_sundry"
],
"area": [
{
"xpos": 350,
"ypos": 160,
"width": 12,
"height": 18,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_terminal"
],
"area": [
{
"xpos": 209,
"ypos": 591,
"width": 45,
"height": 32,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_terminal"
],
"area": [
{
"xpos": 207,
"height": 32,
"width": 45,
"type": "match",
"ypos": 588
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_texteditor"
],
"area": [
{
"xpos": 490,
"ypos": 170,
"width": 37,
"height": 42,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_utilities"
],
"area": [
{
"xpos": 615,
"ypos": 156,
"width": 77,
"height": 88,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"ypos": 155,
"width": 77,
"type": "match",
"height": 88,
"xpos": 475
}
],
"properties": [],
"tags": [
"apps_menu_utilities"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"type": "match",
"xpos": 614,
"height": 88,
"ypos": 153,
"width": 77
}
],
"properties": [],
"tags": [
"apps_menu_utilities"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"apps_menu_videos"
],
"area": [
{
"xpos": 764,
"ypos": 157,
"width": 54,
"height": 60,
"type": "match"
}
]
}

Some files were not shown because too many files have changed in this diff Show More