mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-12-02 02:03:07 +00:00
47 lines
1.2 KiB
Perl
47 lines
1.2 KiB
Perl
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:
|
|
|