From fc93309b41ee0c3f4804246c8cccaecb1a402d7c Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 10 Jan 2020 14:22:20 -0800 Subject: [PATCH] Drop _assert_and_click shim We're on newer code on both deployments now, no longer needed. Signed-off-by: Adam Williamson --- lib/utils.pm | 22 +--------------------- tests/_boot_to_anaconda.pm | 6 +++--- tests/desktop_update_graphical.pm | 2 +- 3 files changed, 5 insertions(+), 25 deletions(-) diff --git a/lib/utils.pm b/lib/utils.pm index c42ca822..5fd45035 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -670,7 +670,7 @@ sub anaconda_create_user { @_ ); 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"; # wait out animation 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 { # This function checks if the correct version is display during installation # in Anaconda, i.e. nonlive media showing Rawhide when Rawhide and version numbers diff --git a/tests/_boot_to_anaconda.pm b/tests/_boot_to_anaconda.pm index 5e3705e1..b36290e9 100644 --- a/tests/_boot_to_anaconda.pm +++ b/tests/_boot_to_anaconda.pm @@ -113,17 +113,17 @@ sub run { else { # on lives, we have to explicitly launch anaconda 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) { # click it again - on KDE since 2019-10 or so it seems # 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'; # wait for anaconda to appear; we click to work around # 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 wait_screen_change { assert_and_click "anaconda_select_install_lang_input"; }; type_safely $language; diff --git a/tests/desktop_update_graphical.pm b/tests/desktop_update_graphical.pm index 1d435307..3f6f36ea 100644 --- a/tests/desktop_update_graphical.pm +++ b/tests/desktop_update_graphical.pm @@ -48,7 +48,7 @@ sub run { # 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) { # 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 # minutes to avoid the idle screen blank kicking in. Depending on