mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-11-25 14:41:27 +00:00
Revert "desktop_browser: remove the new tab workaround"
This reverts commit a0c6d1c88e
.
Sadly we're still getting problems opening new tabs, even though
I thought the os-autoinst change should solve it.
This commit is contained in:
parent
a0c6d1c88e
commit
2ecf97e7a7
@ -3,6 +3,19 @@ use strict;
|
|||||||
use testapi;
|
use testapi;
|
||||||
use utils;
|
use utils;
|
||||||
|
|
||||||
|
sub _open_new_tab {
|
||||||
|
# I hate life. ctrl-t seems to not always be reliable in openQA
|
||||||
|
# tests since 2019-01 or so, but the 'new tab' button is not
|
||||||
|
# always visible because GNOME might pop up a notification that
|
||||||
|
# blocks it. so, we try both.
|
||||||
|
if (check_screen 'browser_new_tab') {
|
||||||
|
assert_and_click 'browser_new_tab';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
send_key 'ctrl-t';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# we are very paranoid with waits and typing speed in this test
|
# we are very paranoid with waits and typing speed in this test
|
||||||
# because the system can be very busy; it's effectively first boot of
|
# because the system can be very busy; it's effectively first boot of
|
||||||
# a freshly installed system and we're running Firefox for the first
|
# a freshly installed system and we're running Firefox for the first
|
||||||
@ -25,13 +38,13 @@ sub run {
|
|||||||
sleep 5;
|
sleep 5;
|
||||||
# open a new tab so we don't race with the default page load
|
# open a new tab so we don't race with the default page load
|
||||||
# (also focuses the location bar for us)
|
# (also focuses the location bar for us)
|
||||||
send_key 'ctrl-t';
|
_open_new_tab;
|
||||||
wait_still_screen(stilltime=>2, similarity_level=>45);
|
wait_still_screen(stilltime=>2, similarity_level=>45);
|
||||||
sleep 3;
|
sleep 3;
|
||||||
# check FAS, typing slowly to avoid errors
|
# check FAS, typing slowly to avoid errors
|
||||||
type_very_safely "https://admin.fedoraproject.org/accounts/\n";
|
type_very_safely "https://admin.fedoraproject.org/accounts/\n";
|
||||||
assert_screen "browser_fas_home";
|
assert_screen "browser_fas_home";
|
||||||
send_key 'ctrl-t';
|
_open_new_tab;
|
||||||
wait_still_screen(stilltime=>2, similarity_level=>45);
|
wait_still_screen(stilltime=>2, similarity_level=>45);
|
||||||
sleep 2;
|
sleep 2;
|
||||||
type_very_safely "https://kernel.org\n";
|
type_very_safely "https://kernel.org\n";
|
||||||
@ -47,7 +60,7 @@ sub run {
|
|||||||
# using Firefox by default so we do this unconditionally, but we
|
# using Firefox by default so we do this unconditionally, but we
|
||||||
# may need to conditionalize it if we ever test desktops whose
|
# may need to conditionalize it if we ever test desktops whose
|
||||||
# default browser doesn't support add-ons or uses different ones
|
# default browser doesn't support add-ons or uses different ones
|
||||||
send_key 'ctrl-t';
|
_open_new_tab;
|
||||||
wait_still_screen(stilltime=>2, similarity_level=>45);
|
wait_still_screen(stilltime=>2, similarity_level=>45);
|
||||||
sleep 2;
|
sleep 2;
|
||||||
type_very_safely "https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/\n";
|
type_very_safely "https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user