Commit f38d20c8 authored by Sanad Liaquat's avatar Sanad Liaquat

Reset instance setting after test

Also retry clicking get started button until it does not exist
parent 3de560ca
......@@ -15,16 +15,17 @@ module QA
sign_up.fill_new_user_username_field(user.username)
sign_up.fill_new_user_email_field(user.email)
sign_up.fill_new_user_password_field(user.password)
# Because invisible_captcha would prevent submitting this form
# within 4 seconds, sleep here. This can be removed once we
# implement invisible_captcha as an application setting instead
# of a feature flag, so we can turn it off while testing.
# Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/284113
sleep 5
sign_up.click_new_user_register_button
end
# Because invisible_captcha would prevent submitting this form
# within 4 seconds, sleep here. This can be removed once we
# implement invisible_captcha as an application setting instead
# of a feature flag, so we can turn it off while testing.
# Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/284113
sleep 4
Page::Registration::Welcome.perform(&:click_get_started_button_if_available)
if user.expect_fabrication_success
......
......@@ -9,7 +9,12 @@ module QA
end
def click_get_started_button_if_available
click_element :get_started_button if has_element?(:get_started_button)
if has_element?(:get_started_button)
Support::Retrier.retry_until do
click_element :get_started_button
has_no_element?(:get_started_button)
end
end
end
end
end
......
......@@ -122,6 +122,7 @@ module QA
end
after do
set_require_admin_approval_after_user_signup_via_api(false)
@user.remove_via_api! if @user
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