select environment programmatically

Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D312
This commit is contained in:
Garret Raziel 2015-03-25 11:56:48 +01:00
parent eed0deb6c8
commit c866851e4b
6 changed files with 53 additions and 6 deletions

View File

@ -71,10 +71,7 @@ else
} }
## Select package set. Minimal is the default, if 'default' is specified, skip selection. ## Select package set. Minimal is the default, if 'default' is specified, skip selection.
my $packageset = get_var('PACKAGE_SET', 'minimal'); autotest::loadtest get_var('CASEDIR')."/tests/_software_selection.pm";
unless ($packageset eq 'default') {
autotest::loadtest get_var('CASEDIR')."/tests/_select_".$packageset.".pm";
}
## Disk partitioning ## Disk partitioning
if (get_var('DISK_GUIDED_MULTI')) { if (get_var('DISK_GUIDED_MULTI')) {

View File

@ -0,0 +1,18 @@
{
"properties": [],
"tags": [
"anaconda_minimal_highlighted",
"ENV-DISTRI-fedora",
"ENV-INSTLANG-en_US",
"ENV-FLAVOR-server"
],
"area": [
{
"xpos": 30,
"ypos": 681,
"width": 115,
"height": 15,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

View File

@ -0,0 +1,18 @@
{
"properties": [],
"area": [
{
"xpos": 30,
"ypos": 681,
"width": 114,
"height": 14,
"type": "match"
}
],
"tags": [
"anaconda_minimal_selected",
"ENV-DISTRI-fedora",
"ENV-INSTLANG-en_US",
"ENV-FLAVOR-server"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

View File

@ -3,19 +3,33 @@ use strict;
use testapi; use testapi;
sub run { sub run {
# Select package set. Minimal is the default, if 'default' is specified, skip selection.
my $packageset = get_var('PACKAGE_SET', 'minimal');
if ($packageset eq 'default') {
return
}
# Anaconda hub # Anaconda hub
assert_screen "anaconda_main_hub", 300; # assert_screen "anaconda_main_hub", 300; #
assert_and_click "anaconda_main_hub_select_packages"; assert_and_click "anaconda_main_hub_select_packages";
assert_and_click "anaconda_software_select_box"; # Focus on "base environment" list
send_key "tab";
sleep 1;
send_key "tab";
for (my $i = 0; $i < 20; $i++) { # select desired environment
# go through the list 20 times at max (to prevent infinite loop when it's missing)
for (my $i = 0; !check_screen("anaconda_".$packageset."_highlighted", 1) && $i < 20; $i++) {
send_key "down"; send_key "down";
} }
send_key "spc"; send_key "spc";
# check that desired environment is selected
assert_screen "anaconda_".$packageset."_selected";
assert_and_click "anaconda_spoke_done"; assert_and_click "anaconda_spoke_done";
# Anaconda hub # Anaconda hub