Commit Graph

39 Commits

Author SHA1 Message Date
Adam Williamson c05dfdd120 Fix KDE background solidification for change to sddm-breeze
There used to be a theme.conf.user file, there isn't any more.
I think this should work both before and after.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-12-05 17:17:42 -08:00
Adam Williamson 1ecbd28f82 desktop_login: get rid of KDE welcome tour
The KDE welcome tour is getting in the way of the desktop login
test. Try getting rid of it after logging in.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-11-27 09:55:34 -08:00
Adam Williamson 1effed1069 Drop unused branch and needle in desktop_login
We never hit this path without a system menu button any more,
due to changes in KDE over time. It hasn't been hit for two years.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-05-04 09:57:15 -07:00
Adam Williamson 5e2a91192f desktop_login: also give assert_shutdown longer
Can't really work a soft fail into this one.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-02-18 12:27:52 -08:00
Adam Williamson 3213bb9043 desktop_login: give logout longer, but soft fail
Logout seems to be taking a long time in Rawhide currently. Give
it longer to run, but soft fail. I'll add a bug link once I've
investigated and filed one.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-02-18 11:47:07 -08:00
Adam Williamson f4b154253c desktop_login: don't hit esc on lock screen
Tested that this is not necessary on KDE or GNOME, and on current
KDE it actually seems to break stuff. It's better to just start
typing the password.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-02-07 11:43:16 -08:00
Adam Williamson 079eecf23c Update notes about power menus in desktop_login
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-12-13 12:45:20 -08:00
Adam Williamson baedbd22aa Run tidy to fix some syntax errors that creeped in recently
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-10-10 15:04:06 +02:00
Adam Williamson 5592e2ac93 desktop_login: handle backgrounds in WebP format
...which we just started doing.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-09-28 08:41:45 -07: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 a2df6d976b desktop_login: drop obsolete check for 'login failed' message
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>
2022-05-16 16:11:52 -07:00
Adam Williamson 77cadae5d4 Drop g-i-s disablement in desktop_login
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>
2022-05-16 16:09:28 -07:00
Adam Williamson 9be26becc5 desktop_login: disable automatic updating
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>
2022-03-07 16:38:30 -08:00
Adam Williamson 7ecba92fb5 Drop similarity_level on some desktop_login wait_still_screens
Again, there's a blinking cursor in play here. 47 is too high.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-03-01 20:23:53 -08:00
Adam Williamson 492fcf62e4 Great Needle Cleanup 2021
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>
2021-08-10 11:57:48 -07:00
Dan Čermák 4811ad3fae Replace check_shutdown with assert_shutdown
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.
2021-07-21 22:41:08 +00:00
Adam Williamson 4553a9e43b desktop_login: bit more generous timeout for check_desktop
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>
2021-06-28 16:54:13 -07:00
Adam Williamson a4867ebe76 desktop_login: use esc not alt-f4 to dismiss menu on KDE
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>
2021-05-06 09:52:13 -07:00
Adam Williamson 93628ed230 Tweak desktop_login test for GNOME after wrong password entry
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>
2021-05-03 15:54:41 -07:00
Adam Williamson d414ae3994 desktop_login: don't assert wrong password message on F34+
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>
2021-03-10 17:00:01 -08:00
Adam Williamson 37dba6adc4 Hit 'esc' rather than 'ret' to clear SDDM screensaver state
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>
2021-03-10 16:14:43 -08:00
Adam Williamson ff585d8147 Wait longer for still screen when logging out in desktop_login
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>
2021-03-10 15:48:25 -08:00
Adam Williamson da1f703439 Fix schema stuff in previous commit to work properly
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2021-02-18 14:16:14 -08:00
Adam Williamson b0ce5cc2cd Suppress Welcome Tour for new users in desktop_login
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>
2021-02-18 12:15:06 -08:00
Adam Williamson d0f99cfd51 Add missing brace
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2021-02-12 13:43:44 -08:00
Adam Williamson 4243932d09 Adjust desktop_login and needles for KDE power option changes
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>
2021-02-12 13:34:04 -08:00
Adam Williamson 16313bd80e desktop_login: just reboot from console after user creation
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>
2020-12-04 11:55:36 -08:00
Adam Williamson 8106286a43 desktop_login: don't use solidify_wallpaper, use a hack instead
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>
2020-12-04 11:55:36 -08:00
Adam Williamson fc0698ca1c desktop_login: tweak password typing so we wait after enter
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>
2020-12-04 11:55:36 -08:00
Adam Williamson 24c46489a2 desktop_login: use chpasswd not passwd to set user password
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>
2020-12-04 11:55:36 -08:00
Adam Williamson cb001da6e6 desktop_login: do console stuff at a VT, not a desktop terminal
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>
2020-12-04 11:55:36 -08:00
Adam Williamson 7682872d95 desktop_login: update reboot flow for GNOME changes in F33+
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>
2020-08-17 16:25:32 -07:00
Adam Williamson c9352592e2 desktop_login: correct ownership of home dir after touching it
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>
2020-05-25 15:35:54 -07:00
Adam Williamson de48d228af Revert "Make desktop_login wait a bit before trying to launch stuff"
This reverts commit 3d6e46db28. It
was wrong, I forgot the problem is something else.
2020-05-25 14:18:35 -07:00
Adam Williamson 3d6e46db28 Make desktop_login wait a bit before trying to launch stuff
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>
2020-05-25 13:59:34 -07:00
Lukáš Růžička 61f845dbbf Make solidify_wallpaper more universal to handle different desktops. 2020-05-05 00:14:35 +00:00
Adam Williamson 0b7a9cf3c8 desktop_login: give 'ret' keypress a bit of time to take effect
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>
2020-04-24 10:39:12 -07:00
Lukáš Růžička fd3e4e3280 Change the order of steps and add another check screen.
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.
2020-04-22 21:52:19 +02: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