mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-09 17:04:21 +00:00
3bce9f1007
The shifted characters here frequently get mistyped. Let's use type_safely. If this isn't enough we can try very_safely. Signed-off-by: Adam Williamson <awilliam@redhat.com>
53 lines
1.3 KiB
Perl
53 lines
1.3 KiB
Perl
use base "installedtest";
|
|
use strict;
|
|
use testapi;
|
|
use utils;
|
|
|
|
# This part of the suite tests if the volume levels
|
|
# are reflected in the volume bar in the control menu.
|
|
#
|
|
|
|
sub check_volume {
|
|
my $level = shift;
|
|
# Check that the volume indicator changes
|
|
assert_screen("panel_volume_indicator_$level");
|
|
# Open the control menu and check the volume bar
|
|
# shows the status of the volume level.
|
|
assert_and_click("panel_controls");
|
|
assert_screen("panel_volume_bar_$level");
|
|
# Close the control window
|
|
send_key("esc");
|
|
wait_still_screen(2, similarity_level => 38);
|
|
}
|
|
|
|
sub run {
|
|
my $self = shift;
|
|
# Open the terminal to enable us to set the
|
|
# volume level.
|
|
menu_launch_type("terminal");
|
|
assert_screen("apps_run_terminal");
|
|
# Set the volume to 0%
|
|
type_safely('pactl set-sink-volume @DEFAULT_SINK@ 0%');
|
|
send_key('ret');
|
|
# Check that it worked
|
|
check_volume("zero");
|
|
# Set the volume to 50%
|
|
type_safely('pactl set-sink-volume @DEFAULT_SINK@ 50%');
|
|
send_key('ret');
|
|
# Check that it worked
|
|
check_volume("fifty");
|
|
# Set the volume to 100%
|
|
type_safely('pactl set-sink-volume @DEFAULT_SINK@ 100%');
|
|
send_key('ret');
|
|
# Check that it worked
|
|
check_volume("hundred");
|
|
}
|
|
|
|
sub test_flags {
|
|
return {always_rollback => 1};
|
|
}
|
|
|
|
1;
|
|
|
|
# vim: set sw=4 et:
|