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).
I call this...The @lruzicka Catcher!
It's a script that checks for needles that aren't actually used
anywhere. It also checks for cases where we have a needle JSON
file but no image, or an image file but no JSON file (and wipes
one case of the latter). It also adds a run of the script to tox
so we get it in CI.
You could make this script a lot more elaborate if you like, by
being fancier about parsing the test code and templates, but I
don't think it's really warranted, I think it just needs to be
'good enough'. It's not the end of the world if it misses the
odd thing or the whitelisting goes stale.
Quite a lot of the removed needles are remnants of different
approaches to app start/stop testing which weren't caught in the
initial PR review. The short-name partitioning ones are odd; they
were introduced in the commit that moved needles into subdirs,
but at least some of them don't actually appear to be moves. They
may have been non-tracked files Josef had lying around that got
into the commit by mistake, or they may just be old needles we
really used at some point but aren't using any more.
reclaim_space_second_partition was introduced as part of the
shrink test (along with reclaim_space_first_partition) but was
never actually used by that test - I guess, again, the test got
re-written during review but we forgot to remove the needle. We
rejigged user creation to use tab presses not a needle match a
while back, which made user_creation_password_input unnecessary.
The various cockpit_updates_* needles are I think remnants of
rewrites of the cockpit update tests that again were missed in
PR review, the tests as merged never used them.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Remove a bunch of needles that have not been used for some time,
plus a few workarounds that are similarly stale.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
We still have a 'apps_run_firefox_stop' needle tag which is for
the same thing as 'firefox_close_tabs'. That's dumb. Get rid of
it and only have the firefox_close_tabs tag and needles. Also
clean up some old firefox_close_tabs needles that haven't matched
for months and all the 'apps_run_firefox_stop' needles.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Seems like there's been a change to freetype or something, text
rendering changed in all of these. Note there's one workaround
needle for an untranslated message in Japanese.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This is really a 'generic' needle since it'd be needed for any
RTL language test, it's not specific to arabic.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Mainly because the GDM background became a lighter shade of
grey, for some reason, but also some dialog and icon changes.
Also put all forms of layout_us_ltr-gdm in the same directory.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Removing this broke the GNOME apps test entirely because there
was no GNOME 'workspace' needle any more.
I don't like this needle much, we should probably use
check_desktop_clean or something instead. But for now let's just
put it back.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The way KDE does update notifications has changed - it's now a
permanent pop-up notification. This is a bit awkward for our
logic; it's hard to define a needle that proves this pop-up is
the only notification. Instead, let's dismiss it, then open the
notification tray and assert that there aren't any others. But
we also retain the old behaviour (more or less) for testing old
releases.
The popup notification also blocks the 'refresh' needle in the
systray and so breaks the desktop update test, so we deal with
that too.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
In the last few weeks Boxes is showing an auth dialog on start.
I've filed a bug on this; let's have the test handle it as a
soft failure, since this isn't a fatal problem. Do this by
making an existing needle for this dialog a bit more generic
in name and using it.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The KDE and GNOME 'apps' tests for Firefox both invented their
own 'oh look Firefox is running' needle, even though we already
had one. The GNOME one was broken by the removal of the app
title bar in Firefox 66.
Instead of having three needles for the same thing, let's just
throw the 'apps' ones out and use the pre-existing one from
needles/firefox for all cases.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Utilities came up different *again* in a Rawhide test today, so
this adds a needle which matches on the text. Usually we prefer
image matches to text, but this image seems to keep changing...
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Dunno why we need yet *another*, but even the new one didn't
match on the most recent Branched compose. For now just add
another, we can look in a few weeks which can be thrown away.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
As of Fedora-30-20190316.n.1, gnome-abrt is back under the
Utilities menu and the 'Sundry' menu seems to have disappeared.
Change the test back to using utilities and drop the sundry
needle.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The 'largetext' version of the needle is needed when there's
some notification displaying over the window title, it seems
F28's current font rendering doesn't match the current version
of that needle...
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Fedora logo is missing from GDM in today's Rawhide. Not going
all the way and making this a soft fail as the bug is known and
should be fixed soon, I'll take the needle out again then.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
We're getting a spurious "Authentication required" for a
background refresh of the system repos sometimes, depending on
whether it happens while we're at a tty. This is now accepted
by upstream, so let's handle it and make it a soft failure for
now.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
New GTK+ changed something so the background of many interface
elements is a slightly lighter grey, this broke a bunch of
needles. Here are the retakes. Includes one not-strictly-related
SDDM update and a rename of the one @lruzicka did to match the
others.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The needle could sometimes fail because the item it was looking
for only appeared in a limited set of situations. The new
location should be safer to check and the test should not
fail as a result.
It's my second least favorite day of the year again: Stale
Needle Cleanup Day!
This should get rid of all non-anaconda needles that definitely
are not being used any more. Cleanup of all anaconda needles was
in the previous commit.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This was part of a workaround for a Fedora Atomic Workstation
(old name for Silverblue) issue that got resolved a while back;
we forgot to take the needle out.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
GNOME Software 3.30.5 split the offline update process into two
separate 'download' and 'apply' phases. So we need to handle
clicking 'download' before 'apply', if that happens.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
We're not seeing *exactly* #1314991 any more, but we're seeing
something that looks quite similar: the first attempt to find
updates just doesn't find any. No error message, no updates. I
have reported a bug for this and am investigating it, in the
meantime, let's restore the workaround, elaborated a bit, and
looking for the 'Software is up to date' screen instead of the
error message.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
I rather suspect the *bug* is still basically present and it's
why this test often fails, but we no longer seem to see the
*error message* which lets us detect the bug happening. This
needle has not been hit by any test for six months. So let's
remove the workaround as it adds complexity.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
An selinux alert can hide the 'getting started' window title, so
let's have a variant needle which matches on the big 'Started'
in the window instead. We may as well have both for maximum
match potential.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Seems on x86_64 the text cursor is at the left of the text entry
box, but on aarch64 it's at the right. I have no idea why.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Seems like the indicator arrow's vertical position changed in
F28, for some reason. Anyway, new needles.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Time for an annual spring clean. Based on the admin UI's list
of needles that haven't been matched for a long time, but with
some manual tweaking (some are actually still needed).
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The way GNOME Software displays an error after running into RHBZ
1314991 has changed, it seems, so we need a variant needle to
cope with that. Also, when an upgrade notification is visible,
the 'Restart & Update' button for doing a regular update is
shown in grey (not blue), so we need a variant needle to handle
that too.
We can deal with this annoying bug by looking out for the error
we see when it happens, hitting the 'refresh' button again, and
resetting the loop counter to 1 (requires changing the loop to
a C-style loop).