1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-09 17:04:21 +00:00
Commit Graph

23 Commits

Author SHA1 Message Date
Adam Williamson
f2e87cd128 desktop_browser: handle addon add button not always being visible
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-01-26 22:58:14 -08:00
Adam Williamson
1a65993d36 Add a perltidy check and apply it to the entire codebase
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-07-28 14:38:38 -07:00
Adam Williamson
66bc59de1d Have desktop_browser run disable_firefox_studies
I'd prefer not to do this, but I don't see a better way to deal
with the stupid 'welcome' screens. I'm not maintaining needles
to click them away forever.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-05-24 23:51:59 -07:00
Adam Williamson
4d049f8f7d browser: drop download save screen handling
Firefox 97 is now stable on all releases, so we can forget about
handling browser_download_save and just assume download will
happen automatically.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-05-16 16:27:35 -07:00
Adam Williamson
e05a7629a3 Handle Firefox 97+ not prompting what to do about downloads
Firefox 97+ don't ask you what to do with downloads any more,
they just...download them. For now we'll handle both workflows,
once 97+ is stable everywhere we can drop handling the old one.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-03-10 16:29:31 -08:00
Adam Williamson
9882ddcaa5 Robustify and tweak switch out of overview on GNOME boot
This fails sometimes just because we're too early, or something.
Also with GNOME Shell 41rc, alt-f1 no longer works to open and
close the overview. super *does* seem to work in KDE these days,
so let's switch from alt-f1 to super everywhere.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2021-09-07 11:05:55 -07:00
Dan Čermák
6cb0634edc
fix desktop_browser: FAS is deprecated, use accounts.fedoraproject.org
This also requires a new needle for accounts.fedoraproject.org, as the webpage
is completely different now. The old needle for browser_fas_home is obsolete via
this change and can be removed
2021-08-13 22:53:05 +02:00
Adam Williamson
a30c01ea9a desktop_browser: wait out animations a bit longer when launching
Hoping this helps aarch64 be more reliable.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-12-04 11:55:36 -08:00
Adam Williamson
a5c0f7ffbb Enable several desktop tests on Workstation aarch64 disk image
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-12-04 11:55:33 -08:00
Adam Williamson
0d8ceec820 Try to make desktop_browser more robust
We've been getting failures lately on the first page load, I
think because Firefox is getting even more grindy on startup. So
turn the 'sleep' into a 'wait_still_screen', extend another wait,
and tweak the 'browser' needle so it only matches after the
bookmark bar has loaded rather than as soon as half the chrome
appears. Also make all the wait_still_screens use similarity 45
for consistency (flashing cursor could be there on any of them).

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-10-23 09:48:09 -07:00
Adam Williamson
314f8f84eb Another attempt to improve robustness of desktop_browser
https://openqa.fedoraproject.org/tests/667693#step/desktop_browser/8
shows us matching on Save File when the window is in kind of a
borked state; we'd probably wind up clicking on Open with,
because by the time we click the content of the window will have
moved to where it's actually supposed to be...so let's try this
to slow it down a bit.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-09-16 11:55:31 -07:00
Adam Williamson
9824f20566 Slow down desktop_browser a bit to try and make it more reliable
Getting some odd failures where the downloaded file doesn't show
up in the right place which I think might be due to over rapid
clicking here. Try and slow it down a bit.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-09-11 16:18:15 -07:00
Lukáš Růžička
f3d6a9574c Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.

While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.

So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-04-17 17:27:04 -07:00
Adam Williamson
b12c529e34 Try and reduce timing failures in desktop_browser new tab
The way this works at present, with a check_screen and then an
assert_and_click, there's a window where the check has passed
so we're committed to the assert, but it takes a half second or
so for the assert to actually complete (checking for a needle
is a somewhat heavy operation). During that half second the
'new update!' notification can...and quite often does...appear.
Changing the assert_and_click to a click_lastmatch should (I
hope) tighten this window; click_lastmatch should fire faster
than assert_and_click so there'll be less of a window for the
update notification to appear and break stuff.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2019-10-19 10:30:50 -07:00
Adam Williamson
2ecf97e7a7 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.
2019-07-08 10:25:46 -07:00
Adam Williamson
a0c6d1c88e desktop_browser: remove the new tab workaround
I'm pretty sure I worked around the modifier bug in os-autoinst,
so this shouldn't be necessary any more. See:
https://bugzilla.redhat.com/show_bug.cgi?id=1727388

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2019-07-05 16:42:58 -07:00
Adam Williamson
450f843389 desktop_browser: try both button and ctrl-t for opening new tab
Sigh. It seems sometimes the button isn't visible because GNOME
pops up a fricking notification that blocks it.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2019-03-01 09:13:54 -08:00
Adam Williamson
6d2031dbfd desktop_browser: fix wait_still_screen, drop wait_idle
wait_idle was deprecated and effectively it just sleeps, so
replace these wait_idles with explicit sleeps - I can't think
of a better choice here as we just need to wait for Firefox to
calm down after various operations.

The wait_still_screens were always hitting the 30 second time
out because of the flashing cursor; setting the similarity level
required to lower than the default 47 should fix this.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2019-02-13 09:51:34 -08:00
Adam Williamson
965a1a6546 Click instead of using ctrl-t for new browser tab
ctrl-t seems to be failing often in Firefox tests, and I can't
figure out why. Let's try clicking the 'new tab' button instead
as a workaround.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2019-02-13 09:35:32 -08:00
Adam Williamson
aca7de2861 Change up 'clean desktop' check again (use a util function)
Well, that OCR needle isn't working out so great, as it seems
to match when it shouldn't:

https://openqa.fedoraproject.org/tests/119217#step/_graphical_wait_login/5

So let's try another approach. Ditch the OCR needle and have a
function for checking we're at a clean desktop. It does the
normal needle match, but if we're on GNOME, it also tries
hitting alt+f1 and seeing if we're at the overview; if so, it
hits alt+f1 again (to go back to the desktop) and returns.
2017-07-10 11:47:07 -07:00
Adam Williamson
e68e113f76 Remove test_flags comments, add ignore_failure flag
It's not really a good idea to have the comments that explain
the test_flags in *every* test, because they can go stale and
then we either have to live with them being old or update them
all. Like, now. So let's just take 'em all out. There's always
a reference in the openQA and os-autoinst docs, and those get
updated faster.

More importantly, add the new `ignore_failure` flag to relevant
tests - all the tests that don't have the 'important' or
'fatal' flag at present. Upstream killed the 'important' flag
(making all tests 'important' by default), I got it replaced
with the 'ignore_failure' flag, we now need to explicitly mark
all modules we want the 'ignore_failure' behaviour for.
2017-04-10 15:00:10 -07:00
Adam Williamson
b67f604894 Move all remaining utility functions into exporter modules
Summary:
This adds a couple of new exporter modules, renames main_common
to utils (this is a better name: openSUSE's main_common is
functions used in main.pm, utils is what they call their module
full of miscellaneous commonly-used functions), and moves a
bunch of utility functions that were previously needlessly
implemented as instance methods in base classes into the
exporter modules. That means we can get rid of all the annoying
$self-> syntax for calling them.

We get rid of `fedorabase` entirely, as it's no longer useful
for anything. Other base classes keep the 'standard' methods
(like `post_fail_hook`) and methods which actually need to be
methods (like `root_console`, whose behaviour is different in
anacondatest and installedtest).

Test Plan:
Do a full test suite run and check everything lines
up. There should be no functional differences from before at all,
this is just a re-org.

Reviewers: jskladan, garretraziel_but_actually_jsedlak_who_uses_stupid_nicknames

Reviewed By: garretraziel_but_actually_jsedlak_who_uses_stupid_nicknames

Subscribers: tflink

Differential Revision: https://phab.qa.fedoraproject.org/D1080
2017-01-17 23:15:44 -08:00
Adam Williamson
e9ce14a891 consolidate login waits, use postinstall not entrypoint for base
Summary:
I started out wanting to fix an issue I noticed today where
graphical upgrade tests were failing because they didn't wait
for the graphical login screen properly; the test was sitting
at the 'full Fedora logo' state of plymouth for a long time,
so the current boot_to_login_screen's wait_still_screen was
triggered by it and the function wound up failing on the
assert_screen, because it was still some time before the real
login screen appeared.

So I tweaked the boot_to_login_screen implementation to work
slightly differently (look for a login screen match, *then* -
if we're dealing with a graphical login - wait_still_screen
to defeat the 'old GPU buffer showing login screen' problem
and assert the login screen again). But while working on it,
I figured we really should consolidate all the various places
that handle the bootloader -> login, we were doing it quite
differently in all sorts of different places. And as part of
that, I converted the base tests to use POSTINSTALL (and thus
go through the shared _wait_login tests) instead of handling
boot themselves. As part of *that*, I tweaked main.pm to not
require all POSTINSTALL tests have the _postinstall suffix on
their names, as it really doesn't make sense, and renamed the
tests.

Test Plan: Run all tests, see if they work.

Reviewers: jskladan, garretraziel

Reviewed By: garretraziel

Subscribers: tflink

Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D1015
2016-09-27 11:48:15 -07:00