1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-09-30 17:47:23 +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": {
"profiles": {
"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-upgrade-x86_64-*-64bit": 40,
"fedora-Workstation-live-iso-x86_64-*-64bit": 40,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -7,24 +7,31 @@ use utils;
sub run {
my $self = shift;
my $subvariant = get_var("SUBVARIANT", "Workstation");
# Start the application
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.");
if ($subvariant ne "Silverblue") {
# Start the application
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.
assert_screen 'apps_run_rhythmbox';
# Register application
register_application("rhythmbox");
# Close the application
quit_with_shortcut();
else {
diag("Rhythmbox not installed, skipping the test.");
}
}
sub test_flags {

View File

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

View File

@ -7,10 +7,17 @@ use utils;
sub run {
my $self = shift;
my $subvariant = get_var("SUBVARIANT");
$self->root_console(tty => 3);
my @core_applications;
# 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
# test suite.