1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2025-08-16 13:05:43 +00:00
os-autoinst-distri-fedora/tests/applications/accessibility/clicking.pm
2024-11-14 14:17:39 -08:00

73 lines
2.2 KiB
Perl

use base "installedtest";
use strict;
use testapi;
use utils;
# This script checks that some mouse clicking features work:
# - long click as double click
# - hover as click
sub run {
my $self = shift;
my $version = get_release_number();
# Long click as secondary (right) click
#######################################
# Select Clicking.
assert_and_click('acc_clicking_select_click');
# Switch on the simulation for secondary click -
# click on the option to place focus and then
# send TAB to arrive at the switch and press Space
# to do the actual switching.
assert_and_click('acc_clicking_simulate_rclick');
send_key("tab");
sleep(1);
send_key("spc");
# Go to the title bar and click for 5 seconds to trigger
# the simulation of the secondary click and check that
# a context menu appears as a result.
assert_and_click('acc_clicking_settings_titlebar', clicktime => 5);
assert_screen('acc_clicking_menu_shown');
# Press ESC to get rid of the context menu.
send_key('esc');
# Switch off the simulation - as the switch button for this
# is the only blue switch button on the screen, we can switch
# that by simply clicking on it with no additional magic.
assert_and_click("acc_clicking_switcher_on");
# Hover to click
################
# Switch on hover to click similarly to previous
# task, get focus and use tab to navigate to the
# correct switch button. Then press Space.
assert_and_click('acc_clicking_hover_click');
send_key("tab");
sleep(1);
send_key("spc");
# As there currently no openQA way to set the mouse
# with coordinates taken from a needle, we need to move
# it manualy to a certain location.
#mouse_to_tag('acc_clicking_settings_notifications');
mouse_set(200, 150);
# We will wait for some time to hover above that location,
# but in the mean time, the click should happen without
# any specific action being done on our side.
sleep(5);
# Check that the screen changed in the reaction to this
# automated click.
assert_screen('acc_clicking_postclick');
}
sub test_flags {
return {fatal => 0, always_rollback => 1};
}
1;
# vim: set sw=4 et: