mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-11-14 09:11:26 +00:00
e0d9409c74
This PR fixes issue #188. It adds a test suite to test basic functionality of Evince and brings the following features: * test scripts for various Evince functions. * needles to support the Evince test scripts * new template variables `TESTPATH` and `POSTINSTALL_LOAD_ALL` (see below) * new logic in `main.py` (see below) The new variables and the new logic make it easier to create test suites for post-installation tests. If TESTPATH is used, OpenQA will take all tests mentioned in POSTINSTALL from that specified TESTPATH. If both TESTPATH and POSTINSTALL_LOAD_ALL are used, then OpenQA will run all tests it can find at the TESTPATH location. If POSTINSTALL and POSTINSTALL_LOAD_ALL are set simultaneously, then only POSTINSTALL will be taken into account and OpenQA will only load tests mentioned there.
37 lines
975 B
Perl
37 lines
975 B
Perl
use base "installedtest";
|
|
use strict;
|
|
use testapi;
|
|
use utils;
|
|
|
|
# This part of the suite tests tests that Evince can Save the document As another document.
|
|
|
|
sub run {
|
|
my $self = shift;
|
|
|
|
# Open the menu.
|
|
assert_and_click("gnome_burger_menu", button => "left", timeout => 30);
|
|
|
|
# Select Save As
|
|
assert_and_click("evince_menu_saveas", button => "left", timeout => 30);
|
|
|
|
# Type a new name.
|
|
type_very_safely("alternative");
|
|
|
|
# Click on the Save button
|
|
assert_and_click("gnome_button_save_blue", button => "left", timeout => 30);
|
|
|
|
# Now the document is saved under a different name. We will switch to the
|
|
# terminal console to check that it has been created.
|
|
$self->root_console(tty=>3);
|
|
assert_script_run("ls /home/test/Documents/alternative.pdf");
|
|
|
|
# Now, check that the new file does not differ from the original one.
|
|
assert_script_run("diff /home/test/Documents/evince.pdf /home/test/Documents/alternative.pdf");
|
|
}
|
|
|
|
sub test_flags {
|
|
return {always_rollback => 1};
|
|
}
|
|
|
|
1;
|