[openqa-tests/sam/update] Update from gnome-build-meta commit 196aad7b3384b3985b7df65b605
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [openqa-tests/sam/update] Update from gnome-build-meta commit 196aad7b3384b3985b7df65b605
- Date: Wed, 14 Sep 2022 10:22:45 +0000 (UTC)
commit 15ff4226db6d84da3237228dda33e595ce9738ac
Author: Sam Thursfield <sam thursfield codethink co uk>
Date: Wed Sep 14 11:21:09 2022 +0100
Update from gnome-build-meta commit 196aad7b3384b3985b7df65b605
lib/gnomeutils.pm | 30 ++++++++++++++++++++++++++++++
main.pm | 2 ++
tests/app_settings.pm | 16 ++++++++++++++++
3 files changed, 48 insertions(+)
---
diff --git a/lib/gnomeutils.pm b/lib/gnomeutils.pm
new file mode 100644
index 0000000..75fd7b2
--- /dev/null
+++ b/lib/gnomeutils.pm
@@ -0,0 +1,30 @@
+# Some of this code is based on the OpenSuSE tests, particularly
+# `x11_start_program` function found here:
+# https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/lib/susedistribution.pm
+
+sub run_command {
+ my $command = $_[0];
+ my $desktop_runner_hotkey = 'alt-f2';
+ my $desktop_runner_timeout = 2;
+
+ # Exit activities view if it's open.
+ send_key('esc');
+ wait_still_screen(2);
+
+ send_key($desktop_runner_hotkey, wait_screen_change => true);
+
+ assert_screen('desktop_runner', $desktop_runner_timeout);
+
+ type_string($command);
+ send_key 'ret';
+}
+
+sub start_app {
+ my $command = $_[0];
+ run_command($command);
+
+ wait_still_screen(2);
+ save_screenshot;
+}
+
+1;
diff --git a/main.pm b/main.pm
index b6fbf25..ce045d9 100644
--- a/main.pm
+++ b/main.pm
@@ -2,8 +2,10 @@ use strict;
use testapi;
use autotest;
use needle;
+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_settings.pm";
1;
diff --git a/tests/app_settings.pm b/tests/app_settings.pm
new file mode 100644
index 0000000..96986e3
--- /dev/null
+++ b/tests/app_settings.pm
@@ -0,0 +1,16 @@
+use base 'basetest';
+use strict;
+use testapi;
+use gnomeutils;
+
+sub run {
+ start_app('gnome-control-center');
+ assert_screen('app_settings_startup', 10);
+ send_key('alt-f4');
+}
+
+sub test_flags {
+ return { fatal => 1 };
+}
+
+1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]