1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-21 13:33:08 +00:00

Switch calculator high contrast.

This commit is contained in:
Lukas Ruzicka 2023-08-21 14:20:19 +02:00
parent de395edab7
commit c0796ded3e
4 changed files with 35 additions and 8 deletions

View File

@ -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 disable_updates_repos mount_update_image umount_update_image 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 repos_mirrorlist register_application get_registered_applications solidify_wallpaper check_and_install_git download_testdata make_serial_writable/;
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 disable_updates_repos mount_update_image umount_update_image 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 repos_mirrorlist register_application get_registered_applications solidify_wallpaper check_and_install_git download_testdata make_serial_writable switch_highcontrast/;
# We introduce this global variable to hold the list of applications that have
# registered during the apps_startstop_test when they have sucessfully run.
@ -1531,4 +1531,16 @@ sub make_serial_writable {
sleep 2;
}
# This routine will switch high contrast in Gnome
sub switch_highcontrast {
send_key("super");
type_very_safely("contrast");
assert_and_click("accessibility_launcher");
assert_and_click("accessibility_seeing");
assert_and_click("accessibility_highcontrast");
assert_and_click("icon_window_off");
wait_still_screen(3);
}
1;

View File

@ -1071,6 +1071,24 @@
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%"
}
},
"calculator_highcontrast": {
"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/calculator",
"HIGHCONTRAST": "true",
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%"
}
},
"clocks": {
"profiles": {
"fedora-Silverblue-dvd_ostree-iso-ppc64le-*-ppc64le": 50,

View File

@ -10,6 +10,9 @@ sub run {
# Run the application
menu_launch_type("Calculator");
assert_screen("apps_run_calculator");
# Switch High Contrast if required
switch_highcontrast if (get_var("HIGHCONTRAST"));
}
sub test_flags {

View File

@ -34,13 +34,7 @@ sub run {
desktop_vt;
# In case of high contrast testing switch it on.
if (get_var('HIGHCONTRAST')) {
send_key("super");
type_very_safely("contrast");
assert_and_click("accessibility_launcher");
assert_and_click("accessibility_seeing");
assert_and_click("accessibility_highcontrast");
assert_and_click("icon_window_off");
wait_still_screen(3);
switch_highcontrast();
}
send_key 'super';
# wait out animations