mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2025-05-15 05:01:32 +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
55 lines
1.6 KiB
Perl
55 lines
1.6 KiB
Perl
use base "installedtest";
|
|
use strict;
|
|
use testapi;
|
|
use utils;
|
|
|
|
# This script tests that the flatpak technology is correctly set up
|
|
# and that it can be used without tweaking any settings or installing
|
|
# any packages on the system.
|
|
|
|
sub run {
|
|
|
|
my $self = shift;
|
|
$self->root_console(tty => 3);
|
|
|
|
# Check that that Flatpak is installed on the System.
|
|
# If the following command succeeds, we can assume that Flatpak is installed.
|
|
assert_script_run("flatpak --version");
|
|
|
|
# Check that at least Fedora remote repository is properly configured
|
|
validate_script_output("flatpak remotes", sub { m/fedora/ });
|
|
|
|
# Check that an application exists in the repository
|
|
validate_script_output("flatpak search gvim", sub { m/org.vim.Vim/ });
|
|
|
|
# Check that the application can be installed.
|
|
assert_script_run("flatpak -y install org.vim.Vim", timeout => 720);
|
|
|
|
# Check that it is listed as installed
|
|
assert_script_run("flatpak list | grep GVim");
|
|
|
|
# Now, we will switch into the Desktop and we will try to run the application
|
|
desktop_vt();
|
|
wait_still_screen(3);
|
|
menu_launch_type("gvim", checkstart => 1);
|
|
# Switch off the application
|
|
type_very_safely(":qa\n");
|
|
|
|
# We will switch to the CLI again
|
|
$self->root_console(tty => 3);
|
|
|
|
## Now, we will remove the application again.
|
|
assert_script_run("flatpak -y remove org.vim.Vim", timeout => 240);
|
|
|
|
# Check that it the application is not listed among installed any more.
|
|
assert_script_run("! flatpak list | grep GVim");
|
|
}
|
|
|
|
sub test_flags {
|
|
return {fatal => 1};
|
|
}
|
|
|
|
1;
|
|
|
|
# vim: set sw=4 et:
|