[gnome-build-meta/sam/openqa-apps-1] openqa: Add tests for 5 more apps




commit 904ca4d2a4d9ddc79db26090b0de640e24d5fa89
Author: Sam Thursfield <sam thursfield codethink co uk>
Date:   Thu Nov 4 13:08:16 2021 +0100

    openqa: Add tests for 5 more apps
    
    App tests are no longer fatal.
    
    Some tests fail when run locally with a Perl error that I don't
    understand.
    
    Perl says:
    
        [2021-11-04T11:59:34.095 UTC] [debug] ||| starting app_epiphany tests/app_epiphany.pm
        [2021-11-04T11:59:34.221 UTC] [info] ::: basetest::runtest: # Test died: Undefined subroutine 
&app_epiphany::start_app called at /tests/tests/app_epiphany.pm line 7.
    
    However the exact same code works in test `app_cheese`.

 openqa/main.pm                    |  5 +++++
 openqa/tests/app_cheese.pm        | 16 ++++++++++++++++
 openqa/tests/app_epiphany.pm      | 16 ++++++++++++++++
 openqa/tests/app_gnome_weather.pm | 16 ++++++++++++++++
 openqa/tests/app_nautilus.pm      | 16 ++++++++++++++++
 openqa/tests/app_settings.pm      |  2 +-
 openqa/tests/app_simple_scan.pm   | 16 ++++++++++++++++
 7 files changed, 86 insertions(+), 1 deletion(-)
---
diff --git a/openqa/main.pm b/openqa/main.pm
index ce045d958..8291b4a90 100644
--- a/openqa/main.pm
+++ b/openqa/main.pm
@@ -7,5 +7,10 @@ use File::Basename;
 autotest::loadtest "tests/gnome_install.pm";
 autotest::loadtest "tests/gnome_welcome.pm";
 autotest::loadtest "tests/gnome_desktop.pm";
+autotest::loadtest "tests/app_cheese.pm";
+autotest::loadtest "tests/app_epiphany.pm";
+autotest::loadtest "tests/app_gnome_weather.pm";
+autotest::loadtest "tests/app_nautilus.pm";
 autotest::loadtest "tests/app_settings.pm";
+autotest::loadtest "tests/app_simple_scan.pm";
 1;
diff --git a/openqa/tests/app_cheese.pm b/openqa/tests/app_cheese.pm
new file mode 100644
index 000000000..0ace92789
--- /dev/null
+++ b/openqa/tests/app_cheese.pm
@@ -0,0 +1,16 @@
+use base 'basetest';
+use strict;
+use testapi;
+use gnomeutils;
+
+sub run {
+    start_app('cheese');
+    assert_screen('app_cheese_home', 10);
+    send_key('alt-f4');
+}
+
+sub test_flags {
+    return { fatal => 0 };
+}
+
+1;
diff --git a/openqa/tests/app_epiphany.pm b/openqa/tests/app_epiphany.pm
new file mode 100644
index 000000000..2a8ee426c
--- /dev/null
+++ b/openqa/tests/app_epiphany.pm
@@ -0,0 +1,16 @@
+use base 'basetest';
+use strict;
+use testapi;
+use gnomeutils;
+
+sub run {
+    start_app('epiphany');
+    assert_screen('app_epiphany_home', 10);
+    send_key('alt-f4');
+}
+
+sub test_flags {
+    return { fatal => 0 };
+}
+
+1;
diff --git a/openqa/tests/app_gnome_weather.pm b/openqa/tests/app_gnome_weather.pm
new file mode 100644
index 000000000..d3c1b0081
--- /dev/null
+++ b/openqa/tests/app_gnome_weather.pm
@@ -0,0 +1,16 @@
+use base 'basetest';
+use strict;
+use testapi;
+use gnomeutils;
+
+sub run {
+    start_app('gnome-weather');
+    assert_screen('app_gnome_weather_home', 10);
+    send_key('alt-f4');
+}
+
+sub test_flags {
+    return { fatal => 0 };
+}
+
+1;
diff --git a/openqa/tests/app_nautilus.pm b/openqa/tests/app_nautilus.pm
new file mode 100644
index 000000000..c45ec430e
--- /dev/null
+++ b/openqa/tests/app_nautilus.pm
@@ -0,0 +1,16 @@
+use base 'basetest';
+use strict;
+use testapi;
+use gnomeutils;
+
+sub run {
+    start_app('nautilus');
+    assert_screen('app_nautilus_home', 10);
+    send_key('alt-f4');
+}
+
+sub test_flags {
+    return { fatal => 0 };
+}
+
+1;
diff --git a/openqa/tests/app_settings.pm b/openqa/tests/app_settings.pm
index 96986e335..635e21ac9 100644
--- a/openqa/tests/app_settings.pm
+++ b/openqa/tests/app_settings.pm
@@ -10,7 +10,7 @@ sub run {
 }
 
 sub test_flags {
-    return { fatal => 1 };
+    return { fatal => 0 };
 }
 
 1;
diff --git a/openqa/tests/app_simple_scan.pm b/openqa/tests/app_simple_scan.pm
new file mode 100644
index 000000000..11c1d0e46
--- /dev/null
+++ b/openqa/tests/app_simple_scan.pm
@@ -0,0 +1,16 @@
+use base 'basetest';
+use strict;
+use testapi;
+use gnomeutils;
+
+sub run {
+    start_app('simple-scan');
+    assert_screen('app_simple_scan_home', 10);
+    send_key('alt-f4');
+}
+
+sub test_flags {
+    return { fatal => 0 };
+}
+
+1;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]