diff --git a/templates.fif.json b/templates.fif.json index 7133f740..f5a64783 100644 --- a/templates.fif.json +++ b/templates.fif.json @@ -1052,6 +1052,23 @@ "START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%" } }, + "bugreporter": { + "profiles": { + "fedora-Silverblue-dvd_ostree-iso-ppc64le-*-ppc64le": 50, + "fedora-Silverblue-dvd_ostree-iso-x86_64-*-64bit": 50, + "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 20, + "fedora-Workstation-live-iso-x86_64-*-64bit": 20, + "fedora-Workstation-upgrade-x86_64-*-64bit": 40, + "fedora-Workstation-upgrade-aarch64-*-aarch64": 40, + "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 22 + }, + "settings": { + "BOOTFROM": "c", + "HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2", + "POSTINSTALL_PATH": "tests/applications/bugreporter", + "START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%" + } + }, "calculator": { "profiles": { "fedora-Silverblue-dvd_ostree-iso-ppc64le-*-ppc64le": 50, diff --git a/tests/applications/bugreporter/aaa_setup.pm b/tests/applications/bugreporter/aaa_setup.pm new file mode 100644 index 00000000..d7d7d494 --- /dev/null +++ b/tests/applications/bugreporter/aaa_setup.pm @@ -0,0 +1,52 @@ +use base "installedtest"; +use strict; +use testapi; +use utils; + +# This script prepares the environment for the bug reporter (Abrt) test. + +sub run { + my $self = shift; + + # Go to the root console to perform settings. + $self->root_console(tty => 3); + + # Install will-crash -> we will use this to generate some Abrt problems. + + # Return to Desktop + desktop_vt(); + + # Start the application + menu_launch_type("text-editor"); + # Check that it started + assert_screen("apps_run_texteditor"); + + # Open the test file + send_key("ctrl-o"); + wait_still_screen(2); + + # Open the documents location + assert_and_click("gnome_open_location_documents"); + + # Choose the file + assert_and_click("gte_txt_file"); + + # Open it + send_key("ret"); + wait_still_screen(3); + + # Make the application fullscreen + send_key("super-up"); + wait_still_screen(3); + + # Check that the document has been opened + assert_screen("gte_text_file_opened"); +} + +sub test_flags { + return {fatal => 1, milestone => 1}; +} + +1; + +# vim: set sw=4 et: diff --git a/tests/applications/bugreporter/notification.pm b/tests/applications/bugreporter/notification.pm new file mode 100644 index 00000000..8c263bcb --- /dev/null +++ b/tests/applications/bugreporter/notification.pm @@ -0,0 +1,28 @@ +use base "installedtest"; +use strict; +use testapi; +use utils; + +# This script tests if a notification appears after an exception is caught. + +sub run { + my $self = shift; + + # Open Terminal and use will-crash to generate a simulated crash. + menu_launch_type("terminal"); + # Check that the application has started. + assert_screen("apps_run_terminal"); + # Type the command. + enter_cmd("will_segfault"); + # Wait one minute if a notification is displayed, otherwise softfail. + check_screen("bugreporter_notification_displayed", timeout => '60', no_wait => '0'); +} + +sub test_flags { + return {always_rollback => 1}; +} + +1; + +# vim: set sw=4 et: +