Compare commits
2 Commits
ef49ce4cc4
...
db37a56667
Author | SHA1 | Date |
---|---|---|
Lukáš Růžička | db37a56667 | |
Lukáš Růžička | 67f1a6d073 |
|
@ -13,11 +13,15 @@ use utils;
|
||||||
|
|
||||||
sub run {
|
sub run {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
my $desktop = get_var("DESKTOP");
|
||||||
# Switch to console
|
# Switch to console
|
||||||
$self->root_console(tty => 3);
|
$self->root_console(tty => 3);
|
||||||
|
|
||||||
# We install the FTP server's package.
|
# We install the necessary packages.
|
||||||
assert_script_run("dnf -y install pure-ftpd");
|
assert_script_run("dnf -y install pure-ftpd");
|
||||||
|
if ($desktop eq "gnome") {
|
||||||
|
assert_script_run("dnf -y install seahorse");
|
||||||
|
}
|
||||||
|
|
||||||
# Download the configuration file for FTP and unpack it.
|
# Download the configuration file for FTP and unpack it.
|
||||||
download_testdata("configuration");
|
download_testdata("configuration");
|
||||||
|
@ -28,7 +32,7 @@ sub run {
|
||||||
# Set up the system.
|
# Set up the system.
|
||||||
# Add a group for the FTP and the user that will own the FTP stuff
|
# Add a group for the FTP and the user that will own the FTP stuff
|
||||||
assert_script_run("groupadd ftpusers");
|
assert_script_run("groupadd ftpusers");
|
||||||
assert_script_run("useradd --system -g ftpusers -d /dev/null -s /sbin/nologin ftpuser");
|
assert_script_run("useradd -g ftpusers -d /dev/null -s /sbin/nologin ftpuser");
|
||||||
# Create a directory to hold the FTP content, set rights and create the content.
|
# Create a directory to hold the FTP content, set rights and create the content.
|
||||||
assert_script_run("mkdir /ftpdata");
|
assert_script_run("mkdir /ftpdata");
|
||||||
assert_script_run("chown -R ftpuser:ftpusers /ftpdata");
|
assert_script_run("chown -R ftpuser:ftpusers /ftpdata");
|
||||||
|
|
|
@ -13,24 +13,71 @@ use utils;
|
||||||
|
|
||||||
sub run {
|
sub run {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
assert_and_click("keyring_open_network");
|
my $desktop = get_var("DESKTOP");
|
||||||
assert_and_click("keyring_add_network_folder");
|
if ($desktop eq "kde") {
|
||||||
assert_and_click("keyring_select_ftp");
|
# The Dolphin application is already started, so we begin
|
||||||
assert_and_click("kde_button_next");
|
# with clicking on Network to open the network folders.
|
||||||
type_very_safely("FTPConnect");
|
# We want to add a new connection and go through the
|
||||||
send_key("tab");
|
# password addition process.
|
||||||
type_very_safely("tucnak");
|
assert_and_click("keyring_open_network");
|
||||||
send_key("tab");
|
assert_and_click("keyring_add_network_folder");
|
||||||
type_very_safely("127.0.0.1");
|
assert_and_click("keyring_select_ftp");
|
||||||
assert_and_click("keyring_save_connect");
|
assert_and_click("kde_button_next");
|
||||||
type_very_safely("weakpassword");
|
# We will set up the connection.
|
||||||
assert_and_click("keyring_reveal_password");
|
type_very_safely("FTPConnect");
|
||||||
assert_and_click("keyring_remember_password");
|
send_key("tab");
|
||||||
assert_and_click("kde_button_ok");
|
type_very_safely("tucnak");
|
||||||
assert_and_click("keyring_open_location");
|
send_key("tab");
|
||||||
send_key("ret");
|
type_very_safely("127.0.0.1");
|
||||||
assert_screen("keyring_test_file");
|
assert_and_click("keyring_save_connect");
|
||||||
send_key("alt-f4");
|
# Type password to connect
|
||||||
|
type_very_safely("weakpassword");
|
||||||
|
# Reveal it so that we can check it is correctly
|
||||||
|
# written, when there are failures because of that
|
||||||
|
# (I have seen a couple of mistypes during development).
|
||||||
|
assert_and_click("keyring_reveal_password");
|
||||||
|
assert_and_click("keyring_remember_password");
|
||||||
|
assert_and_click("kde_button_ok");
|
||||||
|
# We have added the network location and an icon
|
||||||
|
# has been created to access it. Click on that icon.
|
||||||
|
assert_and_click("keyring_open_location");
|
||||||
|
# While double click would sometimes fail here, we
|
||||||
|
# want to confirm opening the icon using the
|
||||||
|
# Enter key.
|
||||||
|
send_key("ret");
|
||||||
|
# Check that we have opened the location and that
|
||||||
|
# we can see the FTP content.
|
||||||
|
assert_screen("keyring_test_file");
|
||||||
|
# Close the application.
|
||||||
|
send_key("alt-f4");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
# The Nautilus application is already started, so we begin
|
||||||
|
# with clicking on Other locations.
|
||||||
|
# We want to add a new connection and go through the
|
||||||
|
# password addition process.
|
||||||
|
assert_and_click("keyring_other_location");
|
||||||
|
assert_and_click("keyring_location_line");
|
||||||
|
type_very_safely("ftp://127.0.0.1");
|
||||||
|
assert_and_click("keyring_button_connect");
|
||||||
|
# We will set up the connection.
|
||||||
|
assert_and_click("keyring_select_registered");
|
||||||
|
send_key("tab");
|
||||||
|
type_very_safely("tucnak");
|
||||||
|
send_key("tab");
|
||||||
|
type_very_safely("weakpassword");
|
||||||
|
# Reveal it so that we can check it is correctly
|
||||||
|
# written, when there are failures because of that
|
||||||
|
# (I have seen a couple of mistypes during development).
|
||||||
|
assert_and_click("keyring_remember_forever");
|
||||||
|
assert_and_click("keyring_button_connect");
|
||||||
|
# Check that we have opened the location and that
|
||||||
|
# we can see the FTP content.
|
||||||
|
assert_screen("keyring_test_file");
|
||||||
|
# Close the application.
|
||||||
|
send_key("alt-f4");
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub test_flags {
|
sub test_flags {
|
||||||
|
|
|
@ -4,26 +4,31 @@ use testapi;
|
||||||
use utils;
|
use utils;
|
||||||
|
|
||||||
# This script will check that the password has been added
|
# This script will check that the password has been added
|
||||||
# to the system keyring.
|
# to the system keyring. We will start a wallet application
|
||||||
|
# and check that the password is listed in that application.
|
||||||
|
|
||||||
|
|
||||||
sub run {
|
sub run {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
menu_launch_type("kwalletmanager");
|
my $desktop = get_var("DESKTOP");
|
||||||
assert_screen("kwalletmanager_runs");
|
if ($desktop eq "kde") {
|
||||||
send_key("super-pgup");
|
# Start the KDE wallet application and maximize it.
|
||||||
|
menu_launch_type("kwalletmanager");
|
||||||
assert_and_dclick("keyring_passwords_unfold");
|
assert_screen("kwalletmanager_runs");
|
||||||
assert_and_dclick("keyring_maps_unfold");
|
send_key("super-pgup");
|
||||||
assert_and_click("keyring_ftp_localhost");
|
|
||||||
assert_and_click("keyring_show_values");
|
# Navigate to the stored entry and check that
|
||||||
assert_screen("keyring_keys_values");
|
# the credentials are stored there.
|
||||||
|
assert_and_dclick("keyring_passwords_unfold");
|
||||||
|
assert_and_dclick("keyring_maps_unfold");
|
||||||
|
assert_and_click("keyring_ftp_localhost");
|
||||||
|
assert_and_click("keyring_show_values");
|
||||||
|
assert_screen("keyring_keys_values");
|
||||||
|
}
|
||||||
|
|
||||||
|
# Reboot the machine.
|
||||||
$self->root_console( tty => 3 );
|
$self->root_console( tty => 3 );
|
||||||
|
|
||||||
enter_cmd("reboot");
|
enter_cmd("reboot");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub test_flags {
|
sub test_flags {
|
||||||
|
|
|
@ -11,25 +11,32 @@ use utils;
|
||||||
sub run {
|
sub run {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $pw = get_var("USER_PASSWORD") // "weakpassword";
|
my $pw = get_var("USER_PASSWORD") // "weakpassword";
|
||||||
|
my $desktop = get_var("DESKTOP");
|
||||||
my $app = "files";
|
my $app = "files";
|
||||||
if (get_var("DESKTOP") eq "kde") {
|
my $key = "up";
|
||||||
|
if ($desktop eq "kde") {
|
||||||
$app = "dolphin";
|
$app = "dolphin";
|
||||||
|
$key = "pgup";
|
||||||
}
|
}
|
||||||
|
# Check that the machine has been rebooted
|
||||||
|
# and log in.
|
||||||
boot_to_login_screen();
|
boot_to_login_screen();
|
||||||
send_key("ret") if (get_var("DESKTOP") eq "gnome");
|
send_key("ret") if (get_var("DESKTOP") eq "gnome");
|
||||||
type_very_safely("$pw\n");
|
type_very_safely("$pw\n");
|
||||||
wait_still_screen(5);
|
wait_still_screen(5);
|
||||||
|
|
||||||
|
# Start the file exploring application
|
||||||
menu_launch_type($app);
|
menu_launch_type($app);
|
||||||
|
send_key("super-$key");
|
||||||
|
|
||||||
send_key("super-pgup");
|
if ($desktop eq "kde") {
|
||||||
|
# Open the network location and check
|
||||||
|
# that the FTP content is accessible.
|
||||||
assert_and_click("keyring_open_network");
|
assert_and_click("keyring_open_network");
|
||||||
assert_and_click("keyring_open_location");
|
assert_and_click("keyring_open_location");
|
||||||
send_key("ret");
|
send_key("ret");
|
||||||
assert_screen("keyring_test_file");
|
assert_screen("keyring_test_file");
|
||||||
send_key("alt-f4");
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub test_flags {
|
sub test_flags {
|
||||||
|
|
Loading…
Reference in New Issue