os-autoinst-distri-fedora/tests/applications/keyring/keyring_initiate.pm

90 lines
3.3 KiB
Perl

use base "installedtest";
use strict;
use testapi;
use utils;
# This script will
# - use the file application to log onto the localhost's
# ftp server while we will ask the system to remember the login credentials.
# - check that the credentials have been stored in the system
# - reboot the computer and check that the system still remembers them
# and that we can do the FTP again without credentials.
sub run {
my $self = shift;
my $desktop = get_var("DESKTOP");
if ($desktop eq "kde") {
# The Dolphin application is already started, so we begin
# with clicking on Network to open the network folders.
# We want to add a new connection and go through the
# password addition process.
assert_and_click("keyring_open_network");
assert_and_click("keyring_add_network_folder");
assert_and_click("keyring_select_ftp");
assert_and_click("kde_button_next");
# We will set up the connection.
type_very_safely("FTPConnect");
send_key("tab");
type_very_safely("tucnak");
send_key("tab");
type_very_safely("127.0.0.1");
assert_and_click("keyring_save_connect");
# 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 {
return {fatal => 1, milestone => 1};
}
1;
# vim: set sw=4 et: