Commit 3aeaa892 authored by Sanad Liaquat's avatar Sanad Liaquat

Merge branch 'qa-shl-fix-register-spec' into 'master'

Wait for username validation JS to complete

See merge request gitlab-org/gitlab!53198
parents 8554899d 84615257
...@@ -5,6 +5,10 @@ module QA ...@@ -5,6 +5,10 @@ module QA
module SignUp module SignUp
module_function module_function
def page
Capybara.current_session
end
def sign_up!(user) def sign_up!(user)
Page::Main::Menu.perform(&:sign_out_if_signed_in) Page::Main::Menu.perform(&:sign_out_if_signed_in)
Page::Main::Login.perform(&:switch_to_register_page) Page::Main::Login.perform(&:switch_to_register_page)
...@@ -14,6 +18,11 @@ module QA ...@@ -14,6 +18,11 @@ module QA
sign_up.fill_new_user_username_field(user.username) sign_up.fill_new_user_username_field(user.username)
sign_up.fill_new_user_email_field(user.email) sign_up.fill_new_user_email_field(user.email)
sign_up.fill_new_user_password_field(user.password) sign_up.fill_new_user_password_field(user.password)
Support::Waiter.wait_until(sleep_interval: 0.5) do
page.has_content?("Username is available.")
end
sign_up.click_new_user_register_button sign_up.click_new_user_register_button
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