Update tests to not log in unnecessarily in before(:all) blocks
What does this MR do?
We want to avoid logging in in before(:all)
blocks when not necessary because we don't get a screenshot if there's a failure then.
This updates several tests so that they use the API and don't log in in their before(:all)
block. (They might still log in if they need to create an API token).
It also updates the API client to sign out again if it signs itself in (unless it's explicitly a new API session). This avoids having to sign out in before(:all)
blocks just in case the API client logged in.
This should help figure out what's wrong in cases like #36320 (closed) and #36109 (closed).
Does this MR meet the acceptance criteria?
Conformity
Edited by Mark Lapierre