diff --git a/tests/applications/bugreporter/aaa_setup.pm b/tests/applications/bugreporter/aaa_setup.pm index ac75f261..20d93f68 100644 --- a/tests/applications/bugreporter/aaa_setup.pm +++ b/tests/applications/bugreporter/aaa_setup.pm @@ -12,14 +12,30 @@ sub run { $self->root_console(tty => 3); # Install will-crash -> we will use this to generate some Abrt problems. - assert_script_run("dnf install -y will-crash"); - + assert_script_run("dnf install -y will-crash", timeout => 120); # Return to Desktop desktop_vt(); + + # 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. + unless (check_screen("bugreporter_notification_displayed", timeout => '60')) { + record_soft_failure("The crash notification has not been shown in one minute time frame."); + } + # Exit the terminal. + enter_cmd("exit"); + wait_still_screen(2); + # Start Abrt for further testing. + menu_launch_type("abrt"); + assert_screen("apps_run_abrt"); } sub test_flags { - return {fatal => 1}; + return {fatal => 1, milestone => 1}; } 1; diff --git a/tests/applications/bugreporter/about.pm b/tests/applications/bugreporter/about.pm new file mode 100644 index 00000000..132c66ed --- /dev/null +++ b/tests/applications/bugreporter/about.pm @@ -0,0 +1,28 @@ +use base "installedtest"; +use strict; +use testapi; +use utils; + +# This script tests if the About dialogue can be shown. + +sub run { + my $self = shift; + + # Open the About dialogue using the menu. + assert_and_click("gnome_burger_menu"); + assert_and_click("bugreporter_menu_about"); + assert_screen("bugreporter_about_shown"); + assert_and_click("bugreporter_button_credits"); + assert_screen("bugreporter_credits_shown"); + assert_and_click("bugreporter_button_license"); + assert_screen("bugreporter_license_shown"); +} + +sub test_flags { + return {always_rollback => 1}; +} + +1; + +# vim: set sw=4 et: + diff --git a/tests/applications/bugreporter/delete_report.pm b/tests/applications/bugreporter/delete_report.pm new file mode 100644 index 00000000..298e4aa6 --- /dev/null +++ b/tests/applications/bugreporter/delete_report.pm @@ -0,0 +1,28 @@ +use base "installedtest"; +use strict; +use testapi; +use utils; + +# This script tests if a crash report can be deleted. + +sub run { + my $self = shift; + + # Check that the crash is shown in the left bar. + assert_screen("bugreporter_leftbar_crash_shown"); + # Click on the Delete button. + assert_and_click("bugreporter_button_delete"); + # Check that the crash has disappeared from the left bar. + if (check_screen("bugreporter_leftbar_crash_shown")) { + die("It seems that the crash report could not be deleted."); + } +} + +sub test_flags { + return {always_rollback => 1}; +} + +1; + +# vim: set sw=4 et: + diff --git a/tests/applications/bugreporter/display_crash.pm b/tests/applications/bugreporter/display_crash.pm new file mode 100644 index 00000000..95d15744 --- /dev/null +++ b/tests/applications/bugreporter/display_crash.pm @@ -0,0 +1,28 @@ +use base "installedtest"; +use strict; +use testapi; +use utils; + +# This script tests if a crash can be displayed. + +sub run { + my $self = shift; + + # Check that the crash is shown in the left bar. + assert_screen("bugreporter_leftbar_crash_shown"); + # Check that the main screen shows the crash, too. + assert_screen("bugreporter_main_crash_shown"); + # Click on the Details button to see more info. + assert_and_click("bugreporter_button_details"); + # Check that Details are shown. + assert_screen("bugreporter_details_shown"); +} + +sub test_flags { + return {always_rollback => 1}; +} + +1; + +# vim: set sw=4 et: +