2022-02-10 09:29:17 +00:00
|
|
|
use base "installedtest";
|
|
|
|
use strict;
|
|
|
|
use testapi;
|
|
|
|
use utils;
|
|
|
|
|
|
|
|
# Create a new directory.
|
|
|
|
|
|
|
|
sub run {
|
2022-07-28 20:32:57 +00:00
|
|
|
my $self = shift;
|
2022-02-10 09:29:17 +00:00
|
|
|
|
2022-07-28 20:32:57 +00:00
|
|
|
# Enter the Documents directory to get to the test data.
|
2022-07-23 00:17:59 +00:00
|
|
|
assert_and_click("nautilus_directory_documents");
|
2022-02-10 09:29:17 +00:00
|
|
|
wait_still_screen(2);
|
2022-07-28 20:32:57 +00:00
|
|
|
|
2022-02-10 09:29:17 +00:00
|
|
|
# Click on the Burger menu to open it
|
2022-07-23 00:24:43 +00:00
|
|
|
assert_and_click("gnome_kebab_menu");
|
2022-02-10 09:29:17 +00:00
|
|
|
wait_still_screen(2);
|
2022-07-28 20:32:57 +00:00
|
|
|
|
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-07-28 20:32:57 +00:00
|
|
|
|
2022-02-10 09:29:17 +00:00
|
|
|
# Type in the new name
|
|
|
|
type_safely("new_directory");
|
|
|
|
send_key("ret");
|
2022-07-28 20:32:57 +00:00
|
|
|
|
2022-02-10 09:29:17 +00:00
|
|
|
# Confirm that the directory has appeared in the tree
|
|
|
|
assert_screen("nautilus_new_directory_check");
|
2022-07-28 20:32:57 +00:00
|
|
|
|
2022-02-10 09:29:17 +00:00
|
|
|
# Go into the root console and verify the operation in the background.
|
2022-07-28 20:32:57 +00:00
|
|
|
$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;
|
|
|
|
|
|
|
|
|
|
|
|
|