Closed satorstefan closed 1 year ago
I think the problem is that the UI doesn't know that the user has been logged out and needs to be redrawn. You can reload a page to achieve that. This doesn't sound like a bug in Karibu, closing. If you feel it's something Karibu should do instead, please reopen and provide a simple reproducible example project which clearly demonstrates what needs to be done.
Thanks Martin,
while that was clear, it was not clear to me how to reload the page.
This can be done with: UI.getCurrent().getPage().reload();
It works now!
Hello Martin,
I want to test that the ui shows only the elements which are available based on the user role.
The logout methode from the AAppTest.class removes a role/user from the SecurityContextHolder/SecurityAuthenticatedUser, but that does not affect how karibu interacts with the "ui". This leads to the issue that in a test in which data gets prepared by an admin user, the "not admin" user still sees all the elements he normally should not be able to see.
The work around is to trigger additional navigation. Of course I would like to avoid that. Is there a way to logout in a "stronger" sense?
I use the following dependencies: