2021-08-10 11:50:19 +00:00
|
|
|
use base "installedtest";
|
|
|
|
use strict;
|
|
|
|
use testapi;
|
|
|
|
use utils;
|
|
|
|
|
|
|
|
# This part tests if the application can save the image as a different file.
|
|
|
|
|
|
|
|
sub run {
|
|
|
|
my $self = shift;
|
|
|
|
sleep 2;
|
|
|
|
assert_screen("eog_image_default");
|
|
|
|
|
|
|
|
# Shift-ctrl-S to save a file as a new file.
|
|
|
|
send_key("shift-ctrl-s");
|
2022-01-25 09:35:23 +00:00
|
|
|
wait_still_screen(3);
|
2021-08-10 11:50:19 +00:00
|
|
|
|
|
|
|
# Type the new name, this should be possible without any intervention.
|
|
|
|
type_very_safely("new_image");
|
|
|
|
# Hit enter to confirm
|
|
|
|
send_key("ret");
|
|
|
|
wait_still_screen("2");
|
|
|
|
|
|
|
|
# Go to console
|
|
|
|
$self->root_console(tty=>3);
|
|
|
|
|
|
|
|
# List the location
|
|
|
|
assert_script_run("ls /home/test/Pictures/");
|
|
|
|
|
|
|
|
# Compare the files
|
2022-07-01 12:40:10 +00:00
|
|
|
assert_script_run("diff /home/test/Pictures/leaves.jpg /home/test/Pictures/new_image.jpg");
|
2021-08-10 11:50:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sub test_flags {
|
|
|
|
return {always_rollback => 1};
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
|
|
|
|
|
|
|
# vim: set sw=4 et:
|