- Add code for logging out and getting back in the session
- Check if the changes done works after getting back in session
Details
- Reviewers
bshah sitter - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) - Commits
- R1005:035fa0ecccf0: Verify if favorite and alternative changes persist across session restart.
Diff Detail
- Repository
- R1005 Neon OpenQA Components
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Does this really need a test? Did this ever break?
It appears to me this is essentially doing a test of kconfig/plasmashell's use of kconfig, which should be much more efficiently tested via a unit test (and likely already is)
neon/tests/plasma/plasma_alternatives.pm | ||
---|---|---|
74 | might be worth thinking about a helper logout function in basetest seeing as we do this in two tests now |
I am not sure if there are any existing autotests present for testing that favorites and alternative switch persist through session restart, and that is why thought of adding openqa test for it.
Yeah, I am fairly certain there isn't much that can go wrong which isn't already covered in the relevant unit tests to be honest. Ultimately the switch is a simple config mutation which is more efficiently tested as a unit test I expect.
All that said, I am not objecting, but I am also not convinced this adds much for the cost of having to maintain that additional logout needle.
@bshah what's your thought on this?
About logout needle, I think this code can be useful for future tests as well (not sure about exact usecase but logout is pretty generic workflow thing I am sure)
About test itself, I think I've heard multiple bugs of favorites getting resetted, quick search in inbox gives at least two results, didn't search in bugzilla yet..., (although different then what is being tested)
But in general I'd say favorite and alternatives part are most error-prone and I think they deserve a QA. So at least from my side +1.
neon/lib/basetest_neon.pm | ||
---|---|---|
78–87 | New idea, the idea is from folder-desktop, you can start krunner and type "Logout" and press enter, avoiding alll of the new needle kicker-logout, making this much more compact. You can as well use testapi::x11_start_program('Logout') to trigger the Logout dialog and then assert_and_click ksmserver-logout |
Can you please rebase your changes on latest master? plasma_alternatives.pm has been changed in master branch.
This looks really good now though.
neon/lib/basetest_neon.pm | ||
---|---|---|
80 | I am wondering if we can't drop this. wait_still_screen is essentially a sleep nowadays and only used in legacy code more or less, as such it mostly has no useful application. for this specifically, the only needle the caller can feasibly assert after a logout is sddm, and in between logout and sddm there are no "confusing" screen states that could match sddm, so the wait only delays the test while an assert_screen 'sddm' would do the same albeit more dynamically. So... I would kill that line entirely. |
Ah sorry, I missed something: you still need to delete the kicker-logout needle, seeing as we do not need it anymore.