1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-18 20:43:07 +00:00

Enable start/stop tests on Silverblue.

This commit is contained in:
Lukáš Růžička 2024-06-12 14:35:00 +02:00 committed by Adam Williamson
parent e30060218b
commit 6a4ed83384
30 changed files with 350 additions and 80 deletions

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 508,
"ypos": 491,
"width": 160,
"height": 30,
"type": "match"
}
],
"properties": [],
"tags": [
"apps_connections_popup"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 480,
"ypos": 234,
"width": 61,
"height": 69,
"type": "match"
}
],
"properties": [],
"tags": [
"apps_menu_connections"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 205,
"ypos": 351,
"width": 25,
"height": 34,
"type": "match"
}
],
"properties": [],
"tags": [
"apps_menu_fmw"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 322,
"ypos": 350,
"width": 29,
"height": 38,
"type": "match"
}
],
"properties": [],
"tags": [
"apps_menu_tour"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 508,
"ypos": 473,
"width": 181,
"height": 36,
"type": "match"
}
],
"properties": [],
"tags": [
"apps_run_connections"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 440,
"ypos": 113,
"width": 156,
"height": 21,
"type": "match"
}
],
"properties": [],
"tags": [
"apps_run_fmw"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 441,
"height": 31,
"type": "match",
"ypos": 545,
"width": 141
}
],
"properties": [],
"tags": [
"apps_run_tour"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

View File

@ -626,6 +626,8 @@
"apps_startstop": { "apps_startstop": {
"profiles": { "profiles": {
"fedora-KDE-live-iso-x86_64-*-64bit": 40, "fedora-KDE-live-iso-x86_64-*-64bit": 40,
"fedora-Silverblue-dvd_ostree-iso-ppc64le-*-ppc64le": 50,
"fedora-Silverblue-dvd_ostree-iso-x86_64-*-64bit": 50,
"fedora-Workstation-live-iso-ppc64le-*-ppc64le": 40, "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 40,
"fedora-Workstation-upgrade-x86_64-*-64bit": 40, "fedora-Workstation-upgrade-x86_64-*-64bit": 40,
"fedora-Workstation-live-iso-x86_64-*-64bit": 40, "fedora-Workstation-live-iso-x86_64-*-64bit": 40,

View File

@ -7,22 +7,27 @@ use utils;
sub run { sub run {
my $self = shift; my $self = shift;
my $subvariant = get_var("SUBVARIANT", "Workstation");
# Start the application if ($subvariant ne "Silverblue") {
start_with_launcher('apps_menu_abrt', 'apps_menu_utilities'); # Start the application
# Check that it is started start_with_launcher('apps_menu_abrt', 'apps_menu_utilities');
assert_screen 'apps_run_abrt'; # Check that it is started
# Register application assert_screen 'apps_run_abrt';
register_application('gnome-abrt'); # Register application
# Close the application register_application('gnome-abrt');
quit_with_shortcut(); # Close the application
quit_with_shortcut();
}
else {
diag("Abrt is not installed, skipping the test.");
}
} }
sub test_flags { sub test_flags {
return {}; return {};
} }
1; 1;
# vim: set sw=4 et: # vim: set sw=4 et:

View File

@ -7,21 +7,27 @@ use utils;
sub run { sub run {
my $self = shift; my $self = shift;
my $subvariant = get_var("SUBVARIANT", "Workstation");
# Start the application if ($subvariant ne "Silverblue") {
start_with_launcher('apps_menu_boxes'); # Start the application
assert_screen 'apps_boxes_tutorial'; start_with_launcher('apps_menu_boxes');
send_key 'esc'; assert_screen 'apps_boxes_tutorial';
unless (check_screen 'apps_run_boxes', 30) {
record_soft_failure "Single esc didn't clear tutorial - #2005458?";
send_key 'esc'; send_key 'esc';
assert_screen 'apps_run_boxes'; unless (check_screen 'apps_run_boxes', 30) {
} record_soft_failure "Single esc didn't clear tutorial - #2005458?";
send_key 'esc';
assert_screen 'apps_run_boxes';
}
# Register application # Register application
register_application("gnome-boxes"); register_application("gnome-boxes");
# Close the application # Close the application
quit_with_shortcut(); quit_with_shortcut();
}
else {
diag("Boxes is not installed, skipping the test.");
}
} }
sub test_flags { sub test_flags {

View File

@ -0,0 +1,30 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This test checks that Connections start.
sub run {
my $self = shift;
# Start the application
start_with_launcher('apps_menu_connections', 'apps_menu_utilities');
# The Connections will show a pop up window. Dismiss it.
assert_screen('apps_connections_popup');
assert_and_click('apps_connections_nothanks');
# Check that the app is still running
assert_screen('apps_run_connections');
# Register application
register_application('connections');
# Close the application
quit_with_shortcut();
}
sub test_flags {
return {};
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,33 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This test checks that Fedora Media Writer starts
# on Silverblue.
sub run {
my $self = shift;
my $subvariant = get_var("SUBVARIANT");
if ($subvariant eq "Silverblue") {
# Start the application
start_with_launcher('apps_menu_fmw');
# Check that is started
assert_screen 'apps_run_fmw';
# Register application
register_application('fedora-media-writer');
# Close the application
quit_with_shortcut();
}
else {
diag("Fedora Media Writer is not installed on Workstation by default. Skipping test.");
}
}
sub test_flags {
return {};
}
1;
# vim: set sw=4 et:

View File

@ -7,9 +7,14 @@ use utils;
sub run { sub run {
my $self = shift; my $self = shift;
# Start the application # Start the application
start_with_launcher('apps_menu_fonts', 'apps_menu_utilities'); start_with_launcher('apps_menu_fonts', 'apps_menu_utilities');
# Fonts might not start on the first attempt, especially on
# Silverblue, if that happens, try again to start it.
unless (check_screen('apps_run_fonts', timeout => 30)) {
record_soft_failure('Fonts crashed immediately or did not start on the first attempt.');
start_with_launcher('apps_menu_fonts', 'apps_menu_utilities');
}
# Check that is started # Check that is started
assert_screen 'apps_run_fonts'; assert_screen 'apps_run_fonts';
# Register application # Register application

View File

@ -7,15 +7,21 @@ use utils;
sub run { sub run {
my $self = shift; my $self = shift;
my $subvariant = get_var("SUBVARIANT", "Workstation");
# Start the application if ($subvariant ne "Silverblue") {
start_with_launcher('apps_menu_lcalc'); # Start the application
# Check that is started start_with_launcher('apps_menu_lcalc');
assert_screen 'apps_run_lcalc'; # Check that is started
# Register application assert_screen 'apps_run_lcalc';
register_application("libreoffice-calc"); # Register application
# Close the application register_application("libreoffice-calc");
quit_with_shortcut(); # Close the application
quit_with_shortcut();
}
else {
diag("LibreOffice Calc is not installed, skipping the test.");
}
} }
sub test_flags { sub test_flags {

View File

@ -7,16 +7,22 @@ use utils;
sub run { sub run {
my $self = shift; my $self = shift;
my $subvariant = get_var("SUBVARIANT", "Workstation");
# Start the application if ($subvariant ne "Silverblue") {
start_with_launcher('apps_menu_limpress'); # Start the application
# Check that is started start_with_launcher('apps_menu_limpress');
assert_and_click 'apps_run_limpress_start'; # Check that is started
assert_screen 'apps_run_limpress'; assert_and_click 'apps_run_limpress_start';
# Register application assert_screen 'apps_run_limpress';
register_application("libreoffice-impress"); # Register application
# Close the application register_application("libreoffice-impress");
quit_with_shortcut(); # Close the application
quit_with_shortcut();
}
else {
diag("LibreOffice Impress is not installed, skipping the test.");
}
} }
sub test_flags { sub test_flags {

View File

@ -7,15 +7,21 @@ use utils;
sub run { sub run {
my $self = shift; my $self = shift;
my $subvariant = get_var("SUBVARIANT", "Workstation");
# Start the application if ($subvariant ne "Silverblue") {
start_with_launcher('apps_menu_lwriter'); # Start the application
# Check that is started start_with_launcher('apps_menu_lwriter');
assert_screen 'apps_run_lwriter'; # Check that is started
# Register application assert_screen 'apps_run_lwriter';
register_application("libreoffice-writer"); # Register application
# Close the application register_application("libreoffice-writer");
quit_with_shortcut(); # Close the application
quit_with_shortcut();
}
else {
diag("LibreOffice Write not installed, skipping the test.");
}
} }
sub test_flags { sub test_flags {

View File

@ -7,24 +7,31 @@ use utils;
sub run { sub run {
my $self = shift; my $self = shift;
my $subvariant = get_var("SUBVARIANT", "Workstation");
# Start the application if ($subvariant ne "Silverblue") {
start_with_launcher('apps_menu_rhythmbox'); # Start the application
# To give the screen a bit of time.
wait_still_screen(2);
# On June 15th, 2022, we realized that Rhythmbox tends to
# crash on fresh installation when run for the first time.
# When this happens, softfail and try to start it again.
unless (check_screen("apps_run_rhythmbox")) {
record_soft_failure("Rhythmbox probably crashed when launched for the first time.");
start_with_launcher('apps_menu_rhythmbox'); start_with_launcher('apps_menu_rhythmbox');
# To give the screen a bit of time.
wait_still_screen(2);
# On June 15th, 2022, we realized that Rhythmbox tends to
# crash on fresh installation when run for the first time.
# When this happens, softfail and try to start it again.
unless (check_screen("apps_run_rhythmbox")) {
record_soft_failure("Rhythmbox probably crashed when launched for the first time.");
start_with_launcher('apps_menu_rhythmbox');
}
# Check that application has started.
assert_screen 'apps_run_rhythmbox';
# Register application
register_application("rhythmbox");
# Close the application
quit_with_shortcut();
} }
# Check that application has started. else {
assert_screen 'apps_run_rhythmbox'; diag("Rhythmbox not installed, skipping the test.");
# Register application }
register_application("rhythmbox");
# Close the application
quit_with_shortcut();
} }
sub test_flags { sub test_flags {

View File

@ -7,16 +7,21 @@ use utils;
sub run { sub run {
my $self = shift; my $self = shift;
my $subvariant = get_var("SUBVARIANT", "Workstation");
# Start the application if ($subvariant ne "Silverblue") {
start_with_launcher('apps_menu_scan'); # Start the application
# Check that is started start_with_launcher('apps_menu_scan');
assert_screen 'apps_run_scan'; # Check that is started
# Register application assert_screen 'apps_run_scan';
register_application("simple-scan"); # Register application
# Close the application register_application("simple-scan");
quit_with_shortcut(); # Close the application
quit_with_shortcut();
}
else {
diag("Scan is not installed, skipping the test.");
}
} }
sub test_flags { sub test_flags {

View File

@ -0,0 +1,26 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This test checks that Tour starts.
sub run {
my $self = shift;
# Start the application
start_with_launcher('apps_menu_tour');
# Check that is started
assert_screen 'apps_run_tour';
# Register application
register_application('tour');
# Close the application
quit_with_shortcut();
}
sub test_flags {
return {};
}
1;
# vim: set sw=4 et:

View File

@ -7,15 +7,21 @@ use utils;
sub run { sub run {
my $self = shift; my $self = shift;
my $subvariant = get_var("SUBVARIANT", "Workstation");
# Start the application if ($subvariant ne "Silverblue") {
start_with_launcher('apps_menu_videos'); # Start the application
# Check that is started start_with_launcher('apps_menu_videos');
assert_screen 'apps_run_videos'; # Check that is started
# Register application assert_screen 'apps_run_videos';
register_application("totem"); # Register application
# Close the application register_application("totem");
quit_with_shortcut(); # Close the application
quit_with_shortcut();
}
else {
diag("Videos not installed, skipping the test.");
}
} }
sub test_flags { sub test_flags {

View File

@ -7,10 +7,17 @@ use utils;
sub run { sub run {
my $self = shift; my $self = shift;
my $subvariant = get_var("SUBVARIANT");
$self->root_console(tty => 3); $self->root_console(tty => 3);
my @core_applications;
# List of applications, that we want to track for their presence. # List of applications, that we want to track for their presence.
my @core_applications = ("gnome-software", "firefox", "gnome-terminal", "nautilus", "gnome-text-editor", "gnome-boxes"); unless ($subvariant eq "Silverblue") {
my @core_applications = ("gnome-software", "firefox", "gnome-terminal", "nautilus", "gnome-text-editor", "gnome-boxes");
}
else {
my @core_applications = ("gnome-software", "firefox", "gnome-terminal", "nautilus", "gnome-text-editor");
}
# Evaluate the results, make the log files and pass or fail the entire # Evaluate the results, make the log files and pass or fail the entire
# test suite. # test suite.