1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2025-08-14 20:35:44 +00:00
os-autoinst-distri-fedora/tests/applications/accessibility/seeing.pm
2024-11-14 14:17:39 -08:00

61 lines
1.3 KiB
Perl

use base "installedtest";
use strict;
use testapi;
use utils;
# This script checks
# - high contrast
# - shapes
# - larger text
# - always visible scrollbars
# - cursor size
sub check_item {
# This subroutine switches on certain
# accessibility feature, checks that it
# affected the screen, then switches it
# off again.
my $item = shift;
assert_and_click("acc_seeing_$item");
assert_screen("acc_seeing_${item}_enabled");
assert_and_click("acc_seeing_$item");
# If the screen does not change back, die.
die("$item should be off but is still visible.") if check_screen("acc_seeing_${item}_enabled");
}
sub run {
my $self = shift;
# In Settings, open the Seeing tab
assert_and_click("settings_acc_seeing");
# Check high contrast.
check_item('high_contrast');
# Check "shapes".
check_item('shapes');
# Check "bigger_text".
check_item('largetext');
# Check "scrollbars".
check_item("scrollbars");
# Check cursor size
assert_and_click('acc_seeing_cursor_size');
assert_and_click('acc_seeing_largest_cursor');
send_key('esc');
mouse_set(800, 360);
assert_screen('acc_seeing_largest_cursor_enabled');
}
sub test_flags {
return {fatal => 0, always_rollback => 1};
}
1;
# vim: set sw=4 et: