mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-22 05:53:09 +00:00
GNOME application tests: robustify various spots with waits
These tests are failing a lot in various places on aarch64. We just need to slow down a bit and let the poor thing catch up sometimes. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
6aa41f038c
commit
4bed058834
16
lib/utils.pm
16
lib/utils.pm
@ -7,7 +7,7 @@ use Exporter;
|
||||
|
||||
use lockapi;
|
||||
use testapi;
|
||||
our @EXPORT = qw/run_with_error_check type_safely type_very_safely desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type repo_setup setup_workaround_repo cleanup_workaround_repo console_initial_setup handle_welcome_screen gnome_initial_setup anaconda_create_user check_desktop download_modularity_tests quit_firefox advisory_get_installed_packages advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile get_release_number check_left_bar check_top_bar check_prerelease check_version spell_version_number _assert_and_click is_branched rec_log click_unwanted_notifications repos_mirrorlist register_application get_registered_applications solidify_wallpaper check_and_install_git download_testdata/;
|
||||
our @EXPORT = qw/run_with_error_check type_safely type_very_safely desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type repo_setup setup_workaround_repo cleanup_workaround_repo console_initial_setup handle_welcome_screen gnome_initial_setup anaconda_create_user check_desktop download_modularity_tests quit_firefox advisory_get_installed_packages advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile get_release_number check_left_bar check_top_bar check_prerelease check_version spell_version_number _assert_and_click is_branched rec_log click_unwanted_notifications repos_mirrorlist register_application get_registered_applications solidify_wallpaper check_and_install_git download_testdata disable_update_notifications/;
|
||||
|
||||
# We introduce this global variable to hold the list of applications that have
|
||||
# registered during the apps_startstop_test when they have sucessfully run.
|
||||
@ -1460,4 +1460,18 @@ sub download_testdata {
|
||||
assert_script_run("chown -R test:test $location");
|
||||
}
|
||||
|
||||
# Disable update notifications on GNOME to avoid them popping up and
|
||||
# messing up a needle match in a running test.
|
||||
sub disable_update_notifications {
|
||||
menu_launch_type "gnome-terminal";
|
||||
# wait to be sure it's fully open
|
||||
wait_still_screen 5;
|
||||
# When the application opens, run command in it to set the background to black
|
||||
type_very_safely "gsettings set org.gnome.software download-updates-notify false\n";
|
||||
wait_still_screen 2;
|
||||
send_key 'alt-f4';
|
||||
wait_still_screen 5;
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
@ -17,15 +17,23 @@ sub run {
|
||||
download_testdata("evince", "Documents");
|
||||
# Exit the terminal
|
||||
desktop_vt;
|
||||
# slow down keypresses a bit to try and avoid sequences like
|
||||
# ctrl-o failing on aarch64
|
||||
set_var("VNC_TYPING_LIMIT_DEFAULT", 5);
|
||||
|
||||
disable_update_notifications;
|
||||
|
||||
# Start the application
|
||||
menu_launch_type("evince");
|
||||
# Check that is started
|
||||
assert_screen 'apps_run_dviewer';
|
||||
wait_still_screen 5;
|
||||
|
||||
# Open the test file to create a starting point for the other Evince tests.
|
||||
# Click on Open button to open the File Open Dialog
|
||||
assert_and_click("evince_open_file_dialog", button => "left", timeout => 30);
|
||||
# wait out the animation
|
||||
wait_still_screen 5;
|
||||
|
||||
if (get_var("CANNED")) {
|
||||
# open the Documents folder.
|
||||
@ -43,6 +51,8 @@ sub run {
|
||||
|
||||
# Check that the file has been successfully opened.
|
||||
assert_screen("evince_file_opened");
|
||||
# let things settle down before we screenshot.
|
||||
wait_still_screen 5;
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
|
@ -7,7 +7,6 @@ use utils;
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
# Go to the root console to set up the test data and necessary stuff.
|
||||
$self->root_console(tty=>3);
|
||||
|
||||
@ -16,16 +15,23 @@ sub run {
|
||||
download_testdata("gedit", "Documents");
|
||||
# Return to Desktop
|
||||
desktop_vt();
|
||||
# slow down keypresses a bit to try and avoid sequences like
|
||||
# ctrl-o failing on aarch64
|
||||
set_var("VNC_TYPING_LIMIT_DEFAULT", 5);
|
||||
|
||||
disable_update_notifications;
|
||||
|
||||
# Start the application
|
||||
menu_launch_type("gedit");
|
||||
# Check that it started
|
||||
assert_screen("apps_run_texteditor");
|
||||
wait_still_screen 5;
|
||||
|
||||
# Open the test file
|
||||
send_key("ctrl-o");
|
||||
|
||||
# Open the documents location
|
||||
# Wait out animation, then open the documents location
|
||||
wait_still_screen 5;
|
||||
assert_and_click("gnome_open_location_documents");
|
||||
|
||||
# Choose the file
|
||||
@ -39,6 +45,8 @@ sub run {
|
||||
|
||||
# Check that the document has been opened
|
||||
assert_screen("gedit_text_file_opened");
|
||||
# let things settle down before we screenshot
|
||||
wait_still_screen 5;
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
|
@ -10,6 +10,7 @@ sub run {
|
||||
my $self = shift;
|
||||
# Click on a word on the line.
|
||||
assert_and_click "gedit_line_word";
|
||||
wait_still_screen 2;
|
||||
# Delete the line
|
||||
send_key("ctrl-d");
|
||||
# Move cursor out of the way.
|
||||
|
@ -8,11 +8,10 @@ use utils;
|
||||
# that spelling control can be used to find and replace spelling mistakes.
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
# Search the text for specific string.
|
||||
# At first, Wait 1 second for the test to get ready, as the control character was not properly recognized
|
||||
# when the test started immediately after the rollback.
|
||||
sleep 1;
|
||||
my $self = shift;
|
||||
# wait a bit for system to settle
|
||||
wait_still_screen 5;
|
||||
# Invoke the Find dialogue
|
||||
send_key "ctrl-f";
|
||||
# Type string
|
||||
|
Loading…
Reference in New Issue
Block a user