mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2025-06-21 22:11:33 +00:00
The previous version of menu_launch_type took the name of the application as an argument and it started the application. To maximize the application or to check that it has started indeed we had to do it manually. Now, the application also takes "maximize => 1" or "checkstart => 1" to maximize the application or check that it has started as optional arguments to avoid doing it manually, while it still accepts just the name of the application and behaves like it did before. Note that if you decide to use the checkstart argument, you also need to update the check-needles.py script to whitelist the application needle tag, see the example test scripts attached to this PR. Fixes: https://pagure.io/fedora-qa/os-autoinst-distri-fedora/issue/329
52 lines
1.3 KiB
Perl
52 lines
1.3 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.
|
|
assert_screen("terminal_prompt");
|
|
# 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:
|
|
|
|
|
|
|