For a while, it seems like the test was often hitting a message
where the field we match on isn't actually visible because a lot
of other fields are shown first. So, add a variant needle that
matches on a different field, the message ID.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This branch is very fragile, because the test won't fail if we
miss the match on the security needle. So in practice, we are
never going to notice when the needle goes stale, and we'll just
wind up never triggering this branch and always going down the
other path. That's the current situation: the security_install
needle last matched more than a year ago at least. Let's just
admit the truth here and drop the branch entirely.
Also update the cockpit_updates_restart_ignore needle. This is
in a similar case - we don't really notice when it goes stale,
as the test completes, it just takes a bit longer - but since
this one is quite easy to find, let's just update it instead of
dropping it.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
I don't know why we wind up with so many slightly different
matches on the login screen. It's weird.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
It needs to match even if the 'link target hint' is showing at
bottom left and kinda obscuring it a little.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
They changed from "Software Updates" to "Software updates".
Apparently this was intentional and in line with Patternfly
guidance, so not marking as a workaround.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The wider one seems to happen when text at the bottom of the
login box prevents the "Fedora Linux..." text from wrapping
across two lines. I have no idea why we see two different
cases of the "Fedora Linux text wrapped" variant with very
slightly different amounts of whitespace, but we do, it seems
we need both of these.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
We can wind up with this a bit hidden by the bottom-left URL
location indicator, so shrink it a bit to hopefully match even
in that case.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The Cockpit update test relies on scrolling the Cockpit left bar
to find the Software Updates page, but in Firefox 100, the scroll
bars disappear shortly after the last time you moved the mouse.
To deal with this, instead of looking for a scroll bar to scroll,
we'll click the search box in the left bar and hit 'up' to scroll
it to the bottom.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Font's changed since the last time we actually matched this (it
only happens occasionally if specific packages are in the update).
Signed-off-by: Adam Williamson <awilliam@redhat.com>
See https://github.com/cockpit-project/cockpit/issues/16243 .
This is a fairly minor issue upstream knows about but will not
be fixed immediately, so we'll add a workaround for it for now.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Remove a whole chunk of needles that haven't matched for more
than 3 months. Also move a few needles to appropriate locations,
simplify some code chunks that relied on removed needles (if
we're not matching the needles, we don't need those chunks any
more), and drop some other no-longer-needed conditionals for
older releases.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Recent git os-autoinst no longer downsamples screenshots as far
as it did before comparison. This makes a lot of needles where
colors have changed slightly no longer match, so they all needed
updating.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
OK, so sometimes we have a Reboot button, sometimes a Restart
button, sometimes both, but never *always* one or the other. So
we need both needles. Sigh.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
There's a spurious warning on the Updates page, but we don't
want to fail tests for non-related updates on that, and I've
already reported it so it should get fixed.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The 'reboot' button isn't always there in this case, it seems,
but the 'restart services' one is more likely to be. So let's
switch.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Stupid Firefox survey means the thing we usually check isn't
always on the screen. This one checks for PRIORITY.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
When we have to restart Cockpit during the update, we don't get
the usual "successful" screen after logging back in, we'll have
to match on something indicating an update did happen. I wanted
to use the little icon next to the package count but it seems to
have some kind of problem with anti-aliasing or something, I've
created two needles for it and neither matched on the next run
of the test. So let's match on this "reboot needed" text instead,
I hope it'll always be there when we hit this case.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
We finally saw a test where there were *no* errors logged by the
time Cockpit reached the log screen, so there were no entries to
click. Let's just make the test set log level to info before
looking for entries - I prefer this to 'click entry if found,
otherwise change log level' as that's twice as many branches to
look after. Of course, it means the warning triangle entry needle
is useless now :(
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Cockpit 237 has misaligned radio buttons here. We know about the
issue and want the test to not fail on unrelated updates, so let's
make it a soft fail.
Signed-off-by: Adam Williamson <awilliam@redhat.com>