mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-25 07:13:09 +00:00
Add working scripts.
This commit is contained in:
parent
884bffb603
commit
ff06925ec0
@ -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;
|
||||
|
28
tests/applications/bugreporter/about.pm
Normal file
28
tests/applications/bugreporter/about.pm
Normal file
@ -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:
|
||||
|
28
tests/applications/bugreporter/delete_report.pm
Normal file
28
tests/applications/bugreporter/delete_report.pm
Normal file
@ -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:
|
||||
|
28
tests/applications/bugreporter/display_crash.pm
Normal file
28
tests/applications/bugreporter/display_crash.pm
Normal file
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user