1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-29 17:13:09 +00:00
os-autoinst-distri-fedora/tests/applications/software/remove_flatpak.pm

47 lines
1.2 KiB
Perl
Raw Normal View History

use base "installedtest";
use strict;
use testapi;
use utils;
use desktoptools;
# This script tests if Software can remove a previously installed Flatpak applications.
sub run {
my $self = shift;
# Prerequisites for the test.
$self->root_console(tty => 3);
script_run("flatpak install -y org.inkscape.Inkscape", timeout => 1000);
desktop_vt();
# Sometimes, Software crashes at this point.
# If that is the case, restart it.
unless (check_screen("apps_run_software", timeout => 10)) {
restart_application("software");
}
# Remove the application
remove_application("inkscape");
# Now, let us check that the application has been correctly installed.
# We use the CLI method.
$self->root_console(tty => 3);
# Check that the application is not installed.
# The following command returns 0 if successful which is interpreted as False
# by Perl. The test will pass if the number is different from 0 and therefore
# True.
unless (script_run("flatpak list | grep Inkscape")) {
die("The application is still installed, but it should not be.");
}
}
sub test_flags {
# When finished, rollback to milestone.
return {always_rollback => 1};
}
1;
# vim: set sw=4 et: