Commit 9e3b832e authored by Doug Stull's avatar Doug Stull

Merge branch 'jswain_remove_question_in_reg_flow' into 'master'

When in the trial flow, hide intention question

See merge request gitlab-org/gitlab!80684
parents 00c6a02d 1e4316b3
- return unless Gitlab.dev_env_or_com? - return unless Gitlab.dev_env_or_com?
- return if in_trial_flow?
- experiment(:bypass_registration, user: current_user) do |e| - experiment(:bypass_registration, user: current_user) do |e|
- e.publish_to_database - e.publish_to_database
......
...@@ -28,15 +28,15 @@ RSpec.describe 'registrations/welcome/show' do ...@@ -28,15 +28,15 @@ RSpec.describe 'registrations/welcome/show' do
subject { rendered } subject { rendered }
where(:redirect_path, :signup_onboarding_enabled, :show_progress_bar, :flow, :is_continue) do where(:redirect_path, :signup_onboarding_enabled, :show_progress_bar, :flow, :is_continue, :show_joining_question) do
'/-/subscriptions/new' | false | true | :subscription | true '/-/subscriptions/new' | false | true | :subscription | true | true
'/-/subscriptions/new' | true | true | :subscription | true '/-/subscriptions/new' | true | true | :subscription | true | true
'/-/trials/new' | false | false | :trial | true '/-/trials/new' | false | false | :trial | true | false
'/-/trials/new' | true | false | :trial | true '/-/trials/new' | true | false | :trial | true | false
'/oauth/authorize/abc123' | false | false | nil | false '/oauth/authorize/abc123' | false | false | nil | false | true
'/oauth/authorize/abc123' | true | false | nil | false '/oauth/authorize/abc123' | true | false | nil | false | true
nil | false | false | nil | false nil | false | false | nil | false | true
nil | true | true | nil | true nil | true | true | nil | true | true
end end
with_them do with_them do
...@@ -60,7 +60,7 @@ RSpec.describe 'registrations/welcome/show' do ...@@ -60,7 +60,7 @@ RSpec.describe 'registrations/welcome/show' do
context 'when in the candidate variant' do context 'when in the candidate variant' do
let(:experiments) { { bypass_registration: :candidate } } let(:experiments) { { bypass_registration: :candidate } }
it { is_expected.to have_selector('#joining_project_true') } it { is_expected_to_show_joining_question(show_joining_question) }
end end
end end
...@@ -90,6 +90,14 @@ RSpec.describe 'registrations/welcome/show' do ...@@ -90,6 +90,14 @@ RSpec.describe 'registrations/welcome/show' do
end end
end end
def is_expected_to_show_joining_question(status)
if status
is_expected.to have_selector('#joining_project_true')
else
is_expected.not_to have_selector('#joining_project_true')
end
end
context 'rendering the hidden email opt in checkbox' do context 'rendering the hidden email opt in checkbox' do
subject { render } subject { render }
......
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