Commit 0878ebf8 authored by Ian Baum's avatar Ian Baum

Sign out before redirecting to login page

* We expect to be on the login page when redirect_to_login_page is
  called. If we are logged in, we get redirected, and the call to visit
  fails looking for page elements

Changelog: fixed
parent 688e227d
......@@ -157,6 +157,7 @@ module QA
end
def redirect_to_login_page(address)
Menu.perform(&:sign_out_if_signed_in)
desired_host = URI(Runtime::Scenario.send("#{address}_address")).host
Runtime::Browser.visit(address, Page::Main::Login) if desired_host != current_host
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment