[gnome-build-meta/sthursfield/james/openqa-gnome-40: 1/3] Add initial OpenQA tests




commit 6fdf53d8661ed42795d557863906212a95bd7f3f
Author: James Thomas <james thomas codethink co uk>
Date:   Wed Jul 28 09:43:50 2021 +0100

    Add initial OpenQA tests

 tests/main.pm                |  9 +++++++++
 tests/tests/gnome_desktop.pm | 15 +++++++++++++++
 tests/tests/gnome_install.pm | 20 ++++++++++++++++++++
 tests/tests/gnome_welcome.pm | 30 ++++++++++++++++++++++++++++++
 4 files changed, 74 insertions(+)
---
diff --git a/tests/main.pm b/tests/main.pm
new file mode 100644
index 00000000..b6fbf255
--- /dev/null
+++ b/tests/main.pm
@@ -0,0 +1,9 @@
+use strict;
+use testapi;
+use autotest;
+use needle;
+
+autotest::loadtest "tests/gnome_install.pm";
+autotest::loadtest "tests/gnome_welcome.pm";
+autotest::loadtest "tests/gnome_desktop.pm";
+1;
diff --git a/tests/tests/gnome_desktop.pm b/tests/tests/gnome_desktop.pm
new file mode 100644
index 00000000..16f459b9
--- /dev/null
+++ b/tests/tests/gnome_desktop.pm
@@ -0,0 +1,15 @@
+use base 'basetest';
+use strict;
+use testapi;
+
+sub run {
+    my $self = shift;
+    assert_and_click('gnome_desktop_tour', timeout => 60, 'left');
+    assert_screen('gnome_desktop_desktop', 60);
+}
+
+sub test_flags {
+    return { fatal => 1 };
+}
+
+1;
diff --git a/tests/tests/gnome_install.pm b/tests/tests/gnome_install.pm
new file mode 100644
index 00000000..d4694c32
--- /dev/null
+++ b/tests/tests/gnome_install.pm
@@ -0,0 +1,20 @@
+use base 'basetest';
+use strict;
+use testapi;
+
+sub run {
+    my $self = shift;
+    assert_and_click('gnome_install_1', timeout => 120, 'left');
+    assert_and_click('gnome_install_disk', 'left', 10);
+    assert_and_click('gnome_install_disk2', 'left', 10);
+    assert_screen('gnome_install_reformatting1', 120);
+    assert_screen('gnome_install_complete', 120);
+    eject_cd;
+    power('reset');
+}
+
+sub test_flags {
+    return { fatal => 0 };
+}
+
+1;
diff --git a/tests/tests/gnome_welcome.pm b/tests/tests/gnome_welcome.pm
new file mode 100644
index 00000000..d4d7ce6e
--- /dev/null
+++ b/tests/tests/gnome_welcome.pm
@@ -0,0 +1,30 @@
+use base 'basetest';
+use strict;
+use testapi;
+
+sub run {
+    my $self = shift;
+    assert_and_click('gnome_firstboot_welcome', timeout => 600, 'left');
+    assert_and_click('gnome_firstboot_language', timeout => 10, 'left');
+    assert_and_click('gnome_firstboot_privacy', timeout => 10, 'left');
+    assert_screen('gnome_firstboot_timezone_1', 30);
+    type_string('London, East');
+    assert_and_click('gnome_firstboot_timezone_2', timeout => 20, 'left');
+    assert_and_click('gnome_firstboot_timezone_3', timeout => 20, 'left');
+    assert_and_click('gnome_firstboot_accounts', timeout => 10, 'left');
+    assert_screen('gnome_firstboot_aboutyou_1', 10);
+    type_string('testuser');
+    assert_and_click('gnome_firstboot_aboutyou_2', timeout => 10, 'left');
+    assert_screen('gnome_firstboot_password_1', 10);
+    type_string('testingtesting123');
+    send_key('tab');
+    type_string('testingtesting123');
+    assert_and_click('gnome_firstboot_password_2', timeout => 10, 'left');
+    assert_and_click('gnome_firstboot_complete', timeout => 10, 'left');
+}
+
+sub test_flags {
+    return { fatal => 1 };
+}
+
+1;


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