Fix user registration e2e spec

parent c76e1261
- onboarding_issues_experiment_enabled = experiment_enabled?(:onboarding_issues) - onboarding_issues_experiment_enabled = experiment_enabled?(:onboarding_issues)
= button_tag class: %w[btn btn-success w-100] do = button_tag class: %w[btn btn-success w-100], data: { qa_selector: 'get_started_button' } do
= in_subscription_flow? || in_trial_flow? || (onboarding_issues_experiment_enabled && !in_invitation_flow? && !in_oauth_flow?) ? _('Continue') : _('Get started!') = in_subscription_flow? || in_trial_flow? || (onboarding_issues_experiment_enabled && !in_invitation_flow? && !in_oauth_flow?) ? _('Continue') : _('Get started!')
...@@ -14,6 +14,10 @@ module QA ...@@ -14,6 +14,10 @@ module QA
element :new_user_accept_terms_checkbox element :new_user_accept_terms_checkbox
end end
view 'ee/app/views/registrations/welcome/_button.html.haml' do
element :get_started_button
end
def sign_up!(user) def sign_up!(user)
fill_element :new_user_name_field, user.name fill_element :new_user_name_field, user.name
fill_element :new_user_username_field, user.username fill_element :new_user_username_field, user.username
...@@ -24,7 +28,9 @@ module QA ...@@ -24,7 +28,9 @@ module QA
check_element :new_user_accept_terms_checkbox if has_element?(:new_user_accept_terms_checkbox) check_element :new_user_accept_terms_checkbox if has_element?(:new_user_accept_terms_checkbox)
signed_in = retry_until do signed_in = retry_until do
click_element :new_user_register_button click_element :new_user_register_button if has_element?(:new_user_register_button)
click_element :get_started_button if has_element?(:get_started_button)
Page::Main::Menu.perform(&:has_personal_area?) Page::Main::Menu.perform(&:has_personal_area?)
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