1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-12-18 16:43:07 +00:00
os-autoinst-distri-fedora/tests/applications/nautilus/create_directory.pm

49 lines
1.3 KiB
Perl
Raw Permalink Normal View History

2022-02-10 09:29:17 +00:00
use base "installedtest";
use strict;
use testapi;
use utils;
# Create a new directory.
sub run {
my $self = shift;
2022-02-10 09:29:17 +00:00
# Enter the Documents directory to get to the test data.
assert_and_click("nautilus_directory_documents");
2022-02-10 09:29:17 +00:00
wait_still_screen(2);
2022-02-10 09:29:17 +00:00
# Click on the Burger menu to open it
assert_and_click("gnome_kebab_menu");
2022-02-10 09:29:17 +00:00
wait_still_screen(2);
2022-02-10 09:29:17 +00:00
# Click on the Create directory icon to create a new directory.
assert_and_click("nautilus_menu_new_directory");
wait_still_screen(2);
2022-02-10 09:29:17 +00:00
# Type in the new name
type_safely("new_directory");
send_key("ret");
2022-02-10 09:29:17 +00:00
# Confirm that the directory has appeared in the tree
assert_screen("nautilus_new_directory_check");
2022-02-10 09:29:17 +00:00
# Go into the root console and verify the operation in the background.
$self->root_console(tty => 3);
2022-02-10 09:29:17 +00:00
# Check that the directory can be listed.
assert_script_run("ls /home/test/Documents/new_directory", fail_message => "The expected directory does not exist.");
# Check that it indeed is a directory and that it is user writable and executable.
validate_script_output("ls -l /home/test/Documents/ | grep new_directory", sub { m/drwx/ });
}
sub test_flags {
# Rollback to the previous state to make space for other parts.
return {always_rollback => 1};
}
1;