[CE] Speed up login page usage
What does this MR do?
When the login page object is used, the first thing it does is check if the login page is visible, then it checks if we're already logged in.
This caused tests to wait 10 seconds for the check for the login page to fail every time the class was used when the test was already logged in. E.g., whenever the test created a personal access token to use for API access.
This MR reverses the order, checking if we're already logged in first, with a wait of 0. This will pass quickly if we're already logged in - in those cases we're not waiting to be able to log in - we expect to be logged in already. It will also fail quickly if we're not logged in, e.g., when a test logs in for the first time.
EE MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8963
Does this MR meet the acceptance criteria?
- [-] Changelog entry added, if necessary
- [-] Documentation created/updated
- [-] Tests added for this feature/bug
- [-] Tested in all supported browsers
-
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides - [-] Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process.
- [-] Security reports checked/validated by reviewer