Commit baf2eb66 authored by Mike Greiling's avatar Mike Greiling

Merge branch '202095-net-new-saas-trial-sign-ups-are-asked-duplicate-questions' into 'master'

Hide duplicate company/individual question

See merge request gitlab-org/gitlab!24567
parents c58c97cc e504302b
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#group_name.form-group.hidden #group_name.form-group.hidden
= label_tag :new_group_name, _('New Group Name'), for: :new_group_name, class: 'col-form-label' = 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' = text_field_tag :new_group_name, nil, class: 'form-control'
- if current_user.setup_for_company.nil?
.form-group .form-group
= label_tag :trial_entity, _('Is this GitLab trial for your company?') = label_tag :trial_entity, _('Is this GitLab trial for your company?')
.gl-form-checkbox-group .gl-form-checkbox-group
......
---
title: Hide duplicate company/individual question on trial selection
merge_request: 24567
author:
type: fixed
...@@ -14,12 +14,33 @@ describe 'Trial Select Namespace', :js do ...@@ -14,12 +14,33 @@ describe 'Trial Select Namespace', :js do
end end
context 'when user' do context 'when user' do
context 'selects create a new group' do let(:setup_for_company) { nil }
before do before do
user.update! setup_for_company: setup_for_company
visit select_trials_path visit select_trials_path
wait_for_all_requests wait_for_all_requests
choose :trial_entity_company choose :trial_entity_company if setup_for_company.nil?
end
context 'when setup_for_company is not chosen' do
it 'shows company/individual duplicate 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 }
it 'hides company/individual duplicate question' do
expect(page).not_to have_content('Is this GitLab trial for your company?')
end
end
context 'selects create a new group' do
before do
select2 '0', from: '#namespace_id' select2 '0', from: '#namespace_id'
end end
...@@ -98,10 +119,6 @@ describe 'Trial Select Namespace', :js do ...@@ -98,10 +119,6 @@ describe 'Trial Select Namespace', :js do
context 'selects an existing group' do context 'selects an existing group' do
before do before do
visit select_trials_path
wait_for_all_requests
choose :trial_entity_company
select2 user.namespace.id, from: '#namespace_id' select2 user.namespace.id, from: '#namespace_id'
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