Up to F33 we could check that an error message was shown when we
tried to log in with the wrong password on GNOME, but since F34
it's transient and disappears too quick to reliably catch, so
we don't check it any more. Now F33 is EOL, drop the conditional.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The g-i-s new user mode was removed in F34, so we don't need to
do this any more (as the now-removed comment said).
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Otherwise, if there's an update to fXX-backgrounds pending, we'll
get it on reboot in the middle of the test, and the real
backgrounds will comes back and replace our black fake ones and
break the test.
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>
The power_off function in desktop_login was not really asserting/checking
whether the VM got turned off. However, os-autoinst supports checking whether
the VM is turned off via assert_shutdown. This is additionally much more useful
than using check_shutdown, which does nothing if the VM is still running.
It can take some time for first login of a user (especially in
KDE). Test has been failing lately on Rawhide because of this.
It seems until recently we never got a still screen when trying
to log in as Jim - so the effective wait for login to complete
was 60 seconds, 30 seconds for wait_still_screen to time out
then 30 seconds for the actual login needle assertion - but now
we are getting a blank screen for 5 seconds which satisfies
wait_still_screen almost immediately, so effective timeout for
the login process is only 35 seconds, which isn't long enough.
So let's bump the check_desktop timeout to 60 seconds.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
alt-f4 makes sense for an app (Terminal on GNOME) but not really
for closing the system menu (KDE). It seems like it worked till
a day or two back then broke, but I think just using Esc instead
rather than filing a bug is the best plan, I'm not sure I'd
*expect* alt-f4 to work for this.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
It doesn't seem to return to the top level automatically any more,
though the message goes away after a short time, still.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
In GDM 40 the message is displayed only briefly, like in SDDM,
so we can't assert it. Only do it for <F34.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
OK, extending the timeout didn't work. Try this instead. The
problem is when GNOME takes a long time to log out we wrongly
decide we're in the "DM is showing a 'screensaver' state" case
and hit 'ret' to clear it. In GDM that selects the highlighted
user. Maybe if we use 'esc', it'll still work in SDDM to clear
the screensaver state, but not select the first user in the list
in GDM...
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This is a bandaid for GNOME taking a long time to log out right
now. I would prefer to make login_user more robust, but that's a
bit more complicated as it's used for both unlock and login.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
We get Welcome Tour now, not gnome-initial-setup new user mode,
and it doesn't respect the dotfile g-i-s respected.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
KDE in F34+ is now placing sleep, restart and shutdown buttons
right on the system menu, not in a submenu. So we need to sort of
tweak this logic. The approach here is: we count the GNOME
submenu as both a "power" and "leave" menu, so the needle to
enter it has both tags. KDE still has a "leave" submenu, but the
power options are not in a submenu any more, so the new "leave"
needle only has the leave tag, not the power tag. For "leave"
actions we just unconditionally expect the "leave" tag; for
power actions we first match on *either* the submenu tag (for
GNOME and earlier KDE) *or* the action tag, click whatever we
found, and then if we matched the submenu (not the action), we
assert and click the action. After that all paths should be in
sync again and we can continue.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
We don't *need* to log out from the desktop and reboot from the
DM here, that's not part of the test (we test those features
later using jim and jack). Now we don't black out the background
of test's session in KDE, the logout needle doesn't match, so
instead of redoing that needle all the time or re-adding the
solidify_wallpaper call just to make one needle match reliable,
let's just reboot from the console.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
solidify_wallpaper only does the current session, and does it in
a kind of painful way on each desktop. For apps_startstop this
is kinda okay, but for desktop_login it's slow and error-prone
to do this three times, every time. Let's replace it with a hack
that just replaces the actual wallpaper files with a solid black
PNG file. This only takes effect after a logout, but it should
affect all logins on all desktops once it's done. So long as
the base backgrounds package doesn't change layout too much.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This makes it so the `wait_still_screen` that comes at the end
of `type_very_safely` happens *after we hit enter*, not after
we type the password but before we hit enter. I'm hoping this
makes the 'set new password at login' more robust on aarch64, it
seems to be failing often.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This allows us to use assert_script_run, and be more reliable.
Same approach used in _do_install_and_reboot postinstall stuff.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Typing into a desktop terminal is a lot less reliable than typing
into a VT. We're seeing failures here quite often on aarch64, so
let's try doing this stuff in a VT instead.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
GNOME now also splits 'Restart...' and 'Power Off...' as KDE
does, so we need to tweak the conditional and add some needles.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Here we are creating ~/.config for a newly-created user with root
ownership. We can't leave it that way, as commands run as the
user account won't be able to change it, as they should be able
to. So we need to change the ownership (and, just in case, fix
SELinux contexts) afterwards.
This was the real source of the problem we were seeing (the test
failing early due to the gsettings command which should turn the
screen background black failing).
Signed-off-by: Adam Williamson <awilliam@redhat.com>
We're trying to launch stuff the instant we see a desktop, and
it seems to be failing quite often in GNOME. Let's give it a few
seconds.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The default timeout for check_screen is 0, so we were only giving
the enter key press a fraction of a second to take effect before
expecting to see locked_screen_switch_user. This is too tight,
see https://openqa.fedoraproject.org/tests/586257 . Let's give it
five seconds before we give up.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Since GDM shows the "system-menu-button", it could not correctly
switch users on a locked screen. I added a check to see
if we are on a locked screen and behave accordingly.
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).