Commit a38eaf06 authored by Vitaly Slobodin's avatar Vitaly Slobodin

Merge branch '287680-experiment-cleanup-make-the-trial-phone-number-optional' into 'master'

Experiment Cleanup: Make the trial phone number optional

See merge request gitlab-org/gitlab!48443
parents 013d8af3 d031fa8a
- page_title _('Start your Free Gold Trial')
- glm_params = { glm_source: params[:glm_source], glm_content: params[:glm_content] }
- phone_number_required = Feature.disabled?(:trial_form_phone_optional, current_user)
- phone_number_label = phone_number_required ? _('Telephone number') : _('Telephone number (Optional)')
%h3.center.pt-6
= _('Start your Free Gold Trial')
......@@ -25,8 +23,8 @@
= label_tag :company_size, _('Number of employees'), for: :company_size, class: 'col-form-label'
= select_tag :company_size, company_size_options_for_select(params[:company_size]), include_blank: true, class: 'select2', required: true
.form-group
= label_tag :phone_number, phone_number_label, for: :phone_number, class: 'col-form-label'
= text_field_tag :phone_number, params[:phone_number], class: 'form-control', required: phone_number_required
= label_tag :phone_number, _('Telephone number'), for: :phone_number, class: 'col-form-label'
= text_field_tag :phone_number, params[:phone_number], class: 'form-control', required: true
.form-group
= label_tag :number_of_users, _('How many users will be evaluating the trial?'), for: :number_of_users, class: 'col-form-label'
= number_field_tag :number_of_users, params[:number_of_users], class: 'form-control', required: true, min: 1
......
---
name: trial_form_phone_optional
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24449
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/224606
milestone: '13.0'
type: development
group: group::conversion
default_enabled: false
......@@ -12,38 +12,12 @@ RSpec.describe 'Trial Capture Lead', :js do
end
context 'when user' do
let(:trial_form_phone_optional_feature_enabled) { false }
before do
stub_feature_flags(trial_form_phone_optional: trial_form_phone_optional_feature_enabled)
visit new_trial_path
wait_for_requests
end
context 'phone number is optional' do
let(:trial_form_phone_optional_feature_enabled) { true }
context 'without phone number' do
it 'proceeds to the next step' do
expect_any_instance_of(GitlabSubscriptions::CreateLeadService).to receive(:execute) do
{ success: true }
end
fill_in 'company_name', with: 'GitLab'
select2 '1-99', from: '#company_size'
fill_in 'number_of_users', with: '1'
select2 'US', from: '#country_select'
click_button 'Continue'
expect(page).not_to have_css('flash-container')
expect(current_path).to eq(select_trials_path)
end
end
end
context 'enters valid company information' do
before do
expect_any_instance_of(GitlabSubscriptions::CreateLeadService).to receive(:execute) do
......
......@@ -26698,9 +26698,6 @@ msgstr ""
msgid "Telephone number"
msgstr ""
msgid "Telephone number (Optional)"
msgstr ""
msgid "Template"
msgstr ""
......
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