Commit 626f1415 authored by Tim Zallmann's avatar Tim Zallmann

Merge branch...

Merge branch '202095-adjust-trial-setup-questions-when-user-comes-directly-from-account-signup' into 'master'

Adjust trial company question for new signups

See merge request gitlab-org/gitlab!27563
parents 137aaf1c a9855588
- page_title _('Start a Free Gold Trial')
- glm_params = { glm_source: params[:glm_source], glm_content: params[:glm_content] }
- should_ask_company_question = glm_params[:glm_source] != 'about.gitlab.com'
%h3.center.pt-6
= _('Almost there')
......@@ -16,7 +17,7 @@
#group_name.form-group.hidden
= label_tag :new_group_name, _('New Group Name'), for: :new_group_name, class: 'col-form-label'
= text_field_tag :new_group_name, nil, class: 'form-control'
- if current_user.setup_for_company.nil?
- if should_ask_company_question
.form-group
= label_tag :trial_entity, _('Is this GitLab trial for your company?')
.gl-form-checkbox-group
......
---
title: Hide company question for new account signups
merge_request: 27563
author:
type: changed
......@@ -14,25 +14,23 @@ describe 'Trial Select Namespace', :js do
end
context 'when user' do
let(:setup_for_company) { nil }
let(:url_params) { {} }
before do
user.update! setup_for_company: setup_for_company
visit select_trials_path
visit select_trials_path(url_params)
wait_for_all_requests
choose :trial_entity_company if setup_for_company.nil?
choose :trial_entity_company if url_params[:glm_source] != 'about.gitlab.com'
end
context 'when setup_for_company is not chosen' do
it 'shows company/individual duplicate question' do
context 'when source is not about.gitlab.com' do
it 'shows company/individual question' do
expect(page).to have_content('Is this GitLab trial for your company?')
end
end
context 'when setup_for_company is already chosen' do
let(:setup_for_company) { true }
context 'when source is about.gitlab.com' do
let(:url_params) { { glm_source: 'about.gitlab.com' } }
it 'hides company/individual duplicate question' do
expect(page).not_to have_content('Is this GitLab trial for your company?')
......
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