1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2025-12-01 05:16:00 +00:00
os-autoinst-distri-fedora/tests/applications/navigation/full_screen.pm
Lukáš Růžička cbd251d65c Add mouse move and mouse click
The top panel stays in the application and does not hide. I might be
caused by the mouse being in top area which normally invokes the
panel to appear. Let's move the mouse and click into the middle
of the screen to free the top area.
2025-09-26 14:09:47 +02:00

57 lines
1.6 KiB
Perl

use base "installedtest";
use strict;
use testapi;
use utils;
# This will test that
# - application can be toggled between full screen and normal view
sub run {
my $self = shift;
# Settle in for a while
sleep(5);
# The full screen is not supported by any application, but it
# is supported by several, such as Terminal.
menu_launch_type("terminal", maximize => 1);
# If we see prompt, everything is ok.
assert_screen("terminal_prompt");
# When the application is maximised but not full screen,
# the panel controls should be visible.
assert_screen("panel_controls");
# F11 will trigger the full screen mode, the panel controls
# should no longer be visible, but the page content should
# still be visible.
send_key("f11");
# We still need to see the prompt. However in a virtual machine,
# it sometimes takes some time before the prompt appears. Let's
# wait for it some more time. Also try to move the mouse
# and click in the middle to unblock the top panel.
mouse_set(500, 350);
mouse_click("left");
assert_screen("terminal_prompt", timeout => 60);
# But we should not see the panels.
if (check_screen("panel_controls")) {
die("It seems that full screen mode has not been triggered correctly.");
}
# Another F11 will trigger that full screen mode off. The panel
# controls will be visible again and the page content, too.
send_key("f11");
assert_screen("terminal_prompt");
assert_screen("panel_controls");
}
sub test_flags {
return {always_rollback => 1};
}
1;
# vim: set sw=4 et: