Create test suite for Fedora Media Writer #462
3 changed files with 29 additions and 28 deletions
Move specific subroutines back into the test script
Some subroutines are only used once, so there is no need to have them in a library. This moves them back into the code.
commit
a5b3166873
|
|
@ -8,34 +8,9 @@ use lockapi;
|
|||
use testapi;
|
||||
use utils;
|
||||
|
||||
our @EXPORT = qw(select_edition select_version select_arch confirm_disk_modification check_written_content);
|
||||
our @EXPORT = qw(check_written_content);
|
||||
|
||||
|
||||
# Selects a Fedora edition in Media Writer by opening the dropdown,
|
||||
# clicking the given edition, and asserting the selected state.
|
||||
sub select_edition {
|
||||
my $edition = shift;
|
||||
assert_and_click("mwriter_dropdown_arrow");
|
||||
assert_and_click("mwriter_select_$edition");
|
||||
assert_screen("mwriter_selected_$edition");
|
||||
}
|
||||
|
||||
# Selects a Fedora version in Media Writer by opening the version dropdown
|
||||
# and clicking the specified version entry.
|
||||
sub select_version {
|
||||
my $version = shift;
|
||||
assert_and_click("mwriter_dropdown_version");
|
||||
assert_and_click("mwriter_select_$version");
|
||||
}
|
||||
|
||||
# Selects a target architecture in Media Writer by opening the architecture
|
||||
# dropdown and clicking the specified architecture entry.
|
||||
sub select_arch {
|
||||
my $arch = shift;
|
||||
assert_and_click("mwriter_dropdown_arch");
|
||||
assert_and_click("mwriter_select_$arch");
|
||||
}
|
||||
|
||||
# Validates that the USB media was written correctly.
|
||||
# Verifies the embedded checksum on the device and compares its contents
|
||||
# byte-for-byte with the originally downloaded ISO image.
|
||||
|
|
|
|||
|
|
@ -6,6 +6,31 @@ use utils;
|
|||
use disks;
|
||||
use mwriter;
|
||||
|
||||
# Selects a Fedora edition in Media Writer by opening the dropdown,
|
||||
# clicking the given edition, and asserting the selected state.
|
||||
sub select_edition {
|
||||
my $edition = shift;
|
||||
assert_and_click("mwriter_dropdown_arrow");
|
||||
assert_and_click("mwriter_select_$edition");
|
||||
assert_screen("mwriter_selected_$edition");
|
||||
}
|
||||
|
||||
# Selects a Fedora version in Media Writer by opening the version dropdown
|
||||
# and clicking the specified version entry.
|
||||
sub select_version {
|
||||
my $version = shift;
|
||||
assert_and_click("mwriter_dropdown_version");
|
||||
assert_and_click("mwriter_select_$version");
|
||||
}
|
||||
|
||||
# Selects a target architecture in Media Writer by opening the architecture
|
||||
# dropdown and clicking the specified architecture entry.
|
||||
sub select_arch {
|
||||
my $arch = shift;
|
||||
assert_and_click("mwriter_dropdown_arch");
|
||||
assert_and_click("mwriter_select_$arch");
|
||||
}
|
||||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $currver = get_var("CURRREL", "43");
|
||||
|
|
@ -48,7 +73,7 @@ sub run {
|
|||
wait_still_screen(5);
|
||||
|
||||
# When auth dialog appears, deal with it.
|
||||
authenticate();
|
||||
authenticate($password, timeout => 15, stillscreen => 3);
|
||||
|
||||
# Sometimes, downloading does not start immediately
|
||||
# and a Write button is shown. If that is the case,
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ use mwriter;
|
|||
|
||||
sub run {
|
||||
my $self = shift;
|
||||
my $password = get_var("USER_PASSWORD", "weakpassword");
|
||||
# Start the application
|
||||
menu_launch_type("media-writer", checkstart => 1);
|
||||
|
||||
|
|
@ -38,7 +39,7 @@ sub run {
|
|||
# Confirm writing to usb.
|
||||
assert_and_click('mwriter_confirm_button');
|
||||
wait_still_screen(5);
|
||||
authenticate();
|
||||
authenticate($password, timeout => 15, stillscreen => 3);
|
||||
|
||||
# Sometimes, downloading does not start immediately
|
||||
# and a Write button is shown. If that is the case,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue