1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-25 15:23:08 +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:
Adam Williamson 2021-09-22 14:10:04 -07:00
parent 6aa41f038c
commit 4bed058834
5 changed files with 39 additions and 7 deletions

View File

@ -7,7 +7,7 @@ use Exporter;
use lockapi; use lockapi;
use testapi; 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 # We introduce this global variable to hold the list of applications that have
# registered during the apps_startstop_test when they have sucessfully run. # 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"); 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; 1;

View File

@ -17,15 +17,23 @@ sub run {
download_testdata("evince", "Documents"); download_testdata("evince", "Documents");
# Exit the terminal # Exit the terminal
desktop_vt; 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 # Start the application
menu_launch_type("evince"); menu_launch_type("evince");
# Check that is started # Check that is started
assert_screen 'apps_run_dviewer'; assert_screen 'apps_run_dviewer';
wait_still_screen 5;
# Open the test file to create a starting point for the other Evince tests. # Open the test file to create a starting point for the other Evince tests.
# Click on Open button to open the File Open Dialog # Click on Open button to open the File Open Dialog
assert_and_click("evince_open_file_dialog", button => "left", timeout => 30); assert_and_click("evince_open_file_dialog", button => "left", timeout => 30);
# wait out the animation
wait_still_screen 5;
if (get_var("CANNED")) { if (get_var("CANNED")) {
# open the Documents folder. # open the Documents folder.
@ -43,6 +51,8 @@ sub run {
# Check that the file has been successfully opened. # Check that the file has been successfully opened.
assert_screen("evince_file_opened"); assert_screen("evince_file_opened");
# let things settle down before we screenshot.
wait_still_screen 5;
} }
sub test_flags { sub test_flags {

View File

@ -7,7 +7,6 @@ use utils;
sub run { sub run {
my $self = shift; my $self = shift;
# Go to the root console to set up the test data and necessary stuff. # Go to the root console to set up the test data and necessary stuff.
$self->root_console(tty=>3); $self->root_console(tty=>3);
@ -16,16 +15,23 @@ sub run {
download_testdata("gedit", "Documents"); download_testdata("gedit", "Documents");
# Return to Desktop # Return to Desktop
desktop_vt(); 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 # Start the application
menu_launch_type("gedit"); menu_launch_type("gedit");
# Check that it started # Check that it started
assert_screen("apps_run_texteditor"); assert_screen("apps_run_texteditor");
wait_still_screen 5;
# Open the test file # Open the test file
send_key("ctrl-o"); 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"); assert_and_click("gnome_open_location_documents");
# Choose the file # Choose the file
@ -39,6 +45,8 @@ sub run {
# Check that the document has been opened # Check that the document has been opened
assert_screen("gedit_text_file_opened"); assert_screen("gedit_text_file_opened");
# let things settle down before we screenshot
wait_still_screen 5;
} }
sub test_flags { sub test_flags {

View File

@ -10,6 +10,7 @@ sub run {
my $self = shift; my $self = shift;
# Click on a word on the line. # Click on a word on the line.
assert_and_click "gedit_line_word"; assert_and_click "gedit_line_word";
wait_still_screen 2;
# Delete the line # Delete the line
send_key("ctrl-d"); send_key("ctrl-d");
# Move cursor out of the way. # Move cursor out of the way.

View File

@ -8,11 +8,10 @@ use utils;
# that spelling control can be used to find and replace spelling mistakes. # that spelling control can be used to find and replace spelling mistakes.
sub run { sub run {
my $self = shift;
# Search the text for specific string. # 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 my $self = shift;
# when the test started immediately after the rollback. # wait a bit for system to settle
sleep 1; wait_still_screen 5;
# Invoke the Find dialogue # Invoke the Find dialogue
send_key "ctrl-f"; send_key "ctrl-f";
# Type string # Type string