This change triggers a cascade of updates and in some cases triggers a sync. The sync trigger also triggers an update of the account permissions which crashes because the HttpRequestManager can't be started on a thread. We shouldn't make HTTP requests from our tests anyway so mock this away.
Contributes to issue CURA-9220.
Changing the log-in state causes additional requests to be made to get information from the account. Previously this wasn't a problem because the information was only obtained from other classes such as the DigitalLibrary to get information on how many library projects the user can make. But now that there are triggers in the Account class itself, those triggers get triggered. It'd make additional requests to the account server. We don't want the tests to make such requests.
Contributes to issue CURA-9220.
The UserProfile is being stored in the account with a simple assignment, and these are just some property getters with a fallback. I don't think we need to test that.
The actual getting of a user profile (and whether that returns correctly when logged out and such) is already tested as part of the OAuth flow where that code lives.
Contributes to issue CURA-8539.
Instead of using a separate function to force logging out before
login, login now has a boolean parameter that instructs it to logout
before loging in again, if the user is alread logged in. It then
starts the authorization with a force browser logout first.
CURA-7427
The PrintInformation test wasn't cleaning up after itself correclty. This
left some stuff behind that the other tests were using. Since this is bad (as at that point
tests can influence other tests), i've fixed that