Commit d8d0a927 authored by Mark Lapierre's avatar Mark Lapierre

Assume can sign in if sign in button is present

The standard sign in process has been replaced with an experimental
one that excludes the Sign In tab when there's only the one standard
sign in method available.

Rather than check for the Sign In tab, this change assumes it's
possible to sign in again if the sign button is present. We don't
really care what sign in options are available, as long as we were
signed out successfully.
parent 0ac44e6b
......@@ -42,6 +42,10 @@ module QA
element :login_page, required: true
end
def can_sign_in?
has_element?(:sign_in_button)
end
def sign_in_using_credentials(user: nil, skip_page_validation: false)
# Don't try to log-in if we're already logged-in
return if Page::Main::Menu.perform(&:signed_in?)
......
......@@ -14,11 +14,11 @@ module QA
Support::Retrier.retry_until(sleep_interval: 0.5) do
Page::Main::Menu.perform(&:sign_out)
Page::Main::Login.perform(&:has_sign_in_tab?)
Page::Main::Login.perform(&:can_sign_in?)
end
Page::Main::Login.perform do |form|
expect(form.sign_in_tab?).to be(true)
expect(form.can_sign_in?).to be(true)
end
end
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