diff --git a/app/assets/javascripts/pages/registrations/new/index.js b/app/assets/javascripts/pages/registrations/new/index.js index eaafc0235a8b9ee40e4a0a3082b4345ee28d0f39..630a91489f38736eb9545f47e6f2770d27706d36 100644 --- a/app/assets/javascripts/pages/registrations/new/index.js +++ b/app/assets/javascripts/pages/registrations/new/index.js @@ -10,10 +10,7 @@ import Tracking from '~/tracking'; new UsernameValidator(); // eslint-disable-line no-new new LengthValidator(); // eslint-disable-line no-new new NoEmojiValidator(); // eslint-disable-line no-new - -if (gon.features.trialEmailValidation) { - new EmailFormatValidator(); // eslint-disable-line no-new -} +new EmailFormatValidator(); // eslint-disable-line no-new trackNewRegistrations(); diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index ed0e019d02b9880e8f8fb4676187d316d170f490..f9d522f93bbc815a4360a65553403bf880f3702a 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -25,7 +25,6 @@ class RegistrationsController < Devise::RegistrationsController before_action only: [:new] do push_frontend_feature_flag(:gitlab_gtm_datalayer, type: :ops) - push_frontend_feature_flag(:trial_email_validation, type: :development) end feature_category :authentication_and_authorization diff --git a/config/feature_flags/development/trial_email_validation.yml b/config/feature_flags/development/trial_email_validation.yml deleted file mode 100644 index c658a49f195b427549cc007d1097eb001fdeb930..0000000000000000000000000000000000000000 --- a/config/feature_flags/development/trial_email_validation.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: trial_email_validation -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/92762 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/368999 -milestone: '15.3' -type: development -group: group::acquisition -default_enabled: false diff --git a/ee/app/assets/javascripts/pages/trial_registrations/new/index.js b/ee/app/assets/javascripts/pages/trial_registrations/new/index.js index d696a6e40b3f17f909c86fff14a41c1bb531e3d6..c77c7b89eafc37b07dfbc4c708a09b352f97b314 100644 --- a/ee/app/assets/javascripts/pages/trial_registrations/new/index.js +++ b/ee/app/assets/javascripts/pages/trial_registrations/new/index.js @@ -12,10 +12,7 @@ new UsernameValidator(); // eslint-disable-line no-new new LengthValidator(); // eslint-disable-line no-new new SigninTabsMemoizer(); // eslint-disable-line no-new new NoEmojiValidator(); // eslint-disable-line no-new - -if (gon.features.trialEmailValidation) { - new EmailFormatValidator(); // eslint-disable-line no-new -} +new EmailFormatValidator(); // eslint-disable-line no-new trackFreeTrialAccountSubmissions(); diff --git a/ee/app/controllers/trial_registrations_controller.rb b/ee/app/controllers/trial_registrations_controller.rb index 5d9a25aef3f17551b8015e07333b3c0c6e27ed2c..6fb2155c164fd4989cb6035d4bb4b2d964ca862f 100644 --- a/ee/app/controllers/trial_registrations_controller.rb +++ b/ee/app/controllers/trial_registrations_controller.rb @@ -17,7 +17,6 @@ class TrialRegistrationsController < RegistrationsController before_action :redirect_to_trial, only: [:new], if: :user_signed_in? before_action only: [:new] do push_frontend_feature_flag(:gitlab_gtm_datalayer, type: :ops) - push_frontend_feature_flag(:trial_email_validation, type: :development) end def new; end diff --git a/spec/support/shared_examples/features/trial_email_validation_shared_example.rb b/spec/support/shared_examples/features/trial_email_validation_shared_example.rb index 8304a91af86446e66642a5405868b6616ecf1251..5bab1e76e128a9c5c7580b033f1fe8b552523ede 100644 --- a/spec/support/shared_examples/features/trial_email_validation_shared_example.rb +++ b/spec/support/shared_examples/features/trial_email_validation_shared_example.rb @@ -8,52 +8,31 @@ 'This email address does not look right, are you sure you typed it correctly?' end - context 'with trial_email_validation flag enabled' do - it 'shows an error message until a correct email is entered' do - visit path - expect(page).to have_content(email_hint_message) - expect(page).not_to have_content(email_error_message) - expect(page).not_to have_content(email_warning_message) - - fill_in 'new_user_email', with: 'foo@' - fill_in 'new_user_first_name', with: '' - - expect(page).not_to have_content(email_hint_message) - expect(page).to have_content(email_error_message) - expect(page).not_to have_content(email_warning_message) - - fill_in 'new_user_email', with: 'foo@bar' - fill_in 'new_user_first_name', with: '' - - expect(page).not_to have_content(email_hint_message) - expect(page).not_to have_content(email_error_message) - expect(page).to have_content(email_warning_message) - - fill_in 'new_user_email', with: 'foo@gitlab.com' - fill_in 'new_user_first_name', with: '' - - expect(page).not_to have_content(email_hint_message) - expect(page).not_to have_content(email_error_message) - expect(page).not_to have_content(email_warning_message) - end - end + it 'shows an error message until a correct email is entered' do + visit path + expect(page).to have_content(email_hint_message) + expect(page).not_to have_content(email_error_message) + expect(page).not_to have_content(email_warning_message) + + fill_in 'new_user_email', with: 'foo@' + fill_in 'new_user_first_name', with: '' + + expect(page).not_to have_content(email_hint_message) + expect(page).to have_content(email_error_message) + expect(page).not_to have_content(email_warning_message) - context 'when trial_email_validation flag disabled' do - before do - stub_feature_flags trial_email_validation: false - end + fill_in 'new_user_email', with: 'foo@bar' + fill_in 'new_user_first_name', with: '' - it 'does not show an error message' do - visit path - expect(page).to have_content(email_hint_message) - expect(page).not_to have_content(email_error_message) - expect(page).not_to have_content(email_warning_message) + expect(page).not_to have_content(email_hint_message) + expect(page).not_to have_content(email_error_message) + expect(page).to have_content(email_warning_message) - fill_in 'new_user_email', with: 'foo@' + fill_in 'new_user_email', with: 'foo@gitlab.com' + fill_in 'new_user_first_name', with: '' - expect(page).to have_content(email_hint_message) - expect(page).not_to have_content(email_error_message) - expect(page).not_to have_content(email_warning_message) - end + expect(page).not_to have_content(email_hint_message) + expect(page).not_to have_content(email_error_message) + expect(page).not_to have_content(email_warning_message) end end