From de395edab74897c0165ddb5450896e8b64992bf2 Mon Sep 17 00:00:00 2001 From: Lukas Ruzicka Date: Tue, 8 Aug 2023 11:00:29 +0200 Subject: [PATCH] Create a desktop test using high contrast. --- templates.fif.json | 19 +++++++++++++++++++ tests/desktop_browser.pm | 10 ++++++++++ 2 files changed, 29 insertions(+) diff --git a/templates.fif.json b/templates.fif.json index d828bd1b..e2705aca 100644 --- a/templates.fif.json +++ b/templates.fif.json @@ -943,6 +943,25 @@ "START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%" } }, + "desktop_browser_highcontrast": { + "profiles": { + "fedora-KDE-live-iso-x86_64-*-64bit": 22, + "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": "desktop_browser", + "START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%", + "HIGHCONTRAST": "true" + } + }, "desktop_notifications_live": { "profiles": { "fedora-KDE-live-iso-x86_64-*-64bit": 32, diff --git a/tests/desktop_browser.pm b/tests/desktop_browser.pm index b7f6cbff..689e8587 100644 --- a/tests/desktop_browser.pm +++ b/tests/desktop_browser.pm @@ -32,6 +32,16 @@ sub run { $self->root_console(tty => 3); disable_firefox_studies; 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); + } send_key 'super'; # wait out animations wait_still_screen(stilltime => 4, similarity_level => 45);