Commit b35ab8e7 authored by Sanad Liaquat's avatar Sanad Liaquat

Merge branch 'ml-update-login-process-no-tabs' into 'master'

[QA] Fix login test

Closes #35875

See merge request gitlab-org/gitlab!20683
parents 132c56e1 d8d0a927
...@@ -42,6 +42,10 @@ module QA ...@@ -42,6 +42,10 @@ module QA
element :login_page, required: true element :login_page, required: true
end end
def can_sign_in?
has_element?(:sign_in_button)
end
def sign_in_using_credentials(user: nil, skip_page_validation: false) def sign_in_using_credentials(user: nil, skip_page_validation: false)
# Don't try to log-in if we're already logged-in # Don't try to log-in if we're already logged-in
return if Page::Main::Menu.perform(&:signed_in?) return if Page::Main::Menu.perform(&:signed_in?)
......
...@@ -14,11 +14,11 @@ module QA ...@@ -14,11 +14,11 @@ module QA
Support::Retrier.retry_until(sleep_interval: 0.5) do Support::Retrier.retry_until(sleep_interval: 0.5) do
Page::Main::Menu.perform(&:sign_out) Page::Main::Menu.perform(&:sign_out)
Page::Main::Login.perform(&:has_sign_in_tab?) Page::Main::Login.perform(&:can_sign_in?)
end end
Page::Main::Login.perform do |form| 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 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