1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-09-21 22:47:22 +00:00

Drop _assert_and_click shim

We're on newer code on both deployments now, no longer needed.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2020-01-10 14:22:20 -08:00
parent dba4e8c57d
commit fc93309b41
3 changed files with 5 additions and 25 deletions

View File

@ -670,7 +670,7 @@ sub anaconda_create_user {
@_ @_
); );
my $user_login = get_var("USER_LOGIN") || "test"; my $user_login = get_var("USER_LOGIN") || "test";
_assert_and_click("anaconda_install_user_creation", timeout=>$args{timeout}); assert_and_click("anaconda_install_user_creation", timeout=>$args{timeout});
assert_screen "anaconda_install_user_creation_screen"; assert_screen "anaconda_install_user_creation_screen";
# wait out animation # wait out animation
wait_still_screen 2; wait_still_screen 2;
@ -1089,26 +1089,6 @@ sub check_prerelease {
} }
} }
sub _assert_and_click {
# this is a wrapper around assert_and_click which handles this:
# https://github.com/os-autoinst/os-autoinst/pull/1075/files
# it changed the signature without any backward compatibility, so
# earlier os-autoinsts require an *array* of args, but later ones
# require a *hash* of args. This works with both.
my $version = $OpenQA::Isotovideo::Interface::version;
my ($mustmatch, %args) = @_;
if ($version > 13) {
return assert_and_click($mustmatch, %args);
}
else {
$args{timeout} //= $bmwqemu::default_timeout;
$args{button} //= 'left';
$args{dclick} //= 0;
$args{mousehide} //= 0;
return assert_and_click($mustmatch, $args{button}, $args{timeout}, 0, $args{dclick});
}
}
sub check_version { sub check_version {
# This function checks if the correct version is display during installation # This function checks if the correct version is display during installation
# in Anaconda, i.e. nonlive media showing Rawhide when Rawhide and version numbers # in Anaconda, i.e. nonlive media showing Rawhide when Rawhide and version numbers

View File

@ -113,17 +113,17 @@ sub run {
else { else {
# on lives, we have to explicitly launch anaconda # on lives, we have to explicitly launch anaconda
if (get_var('LIVE')) { if (get_var('LIVE')) {
_assert_and_click("live_start_anaconda_icon", timeout=>300); assert_and_click("live_start_anaconda_icon", timeout=>300);
unless (check_screen "anaconda_select_install_lang", 180) { unless (check_screen "anaconda_select_install_lang", 180) {
# click it again - on KDE since 2019-10 or so it seems # click it again - on KDE since 2019-10 or so it seems
# like the first attempt sometimes just doesn't work # like the first attempt sometimes just doesn't work
_assert_and_click("live_start_anaconda_icon", timeout=>300); assert_and_click("live_start_anaconda_icon", timeout=>300);
} }
} }
my $language = get_var('LANGUAGE') || 'english'; my $language = get_var('LANGUAGE') || 'english';
# wait for anaconda to appear; we click to work around # wait for anaconda to appear; we click to work around
# RHBZ #1566066 if it happens # RHBZ #1566066 if it happens
_assert_and_click("anaconda_select_install_lang", timeout=>300); assert_and_click("anaconda_select_install_lang", timeout=>300);
# Select install language # Select install language
wait_screen_change { assert_and_click "anaconda_select_install_lang_input"; }; wait_screen_change { assert_and_click "anaconda_select_install_lang_input"; };
type_safely $language; type_safely $language;

View File

@ -48,7 +48,7 @@ sub run {
# already be visible at this point, we may not need to refresh # already be visible at this point, we may not need to refresh
unless (check_screen ['desktop_package_tool_update_apply', 'desktop_package_tool_update_download'], 5) { unless (check_screen ['desktop_package_tool_update_apply', 'desktop_package_tool_update_download'], 5) {
# refresh updates # refresh updates
_assert_and_click('desktop_package_tool_update_refresh', timeout=>120); assert_and_click('desktop_package_tool_update_refresh', timeout=>120);
} }
# wait for refresh, then apply updates, moving the mouse every two # wait for refresh, then apply updates, moving the mouse every two
# minutes to avoid the idle screen blank kicking in. Depending on # minutes to avoid the idle screen blank kicking in. Depending on