Commit b68a6718 authored by Alper Akgun's avatar Alper Akgun

Add namespace context for upcoming experiments

3 experiments: remove known fields, trimmed skip trial copy and trial
registration with social signin.
parent 1622ac99
......@@ -41,6 +41,9 @@ class TrialsController < ApplicationController
@result = GitlabSubscriptions::ApplyTrialService.new.execute(apply_trial_params)
if @result&.dig(:success)
record_experiment_user(:remove_known_trial_form_fields, namespace_id: @namespace.id)
record_experiment_user(:trimmed_skip_trial_copy, namespace_id: @namespace.id)
record_experiment_user(:trial_registration_with_social_signin, namespace_id: @namespace.id)
record_experiment_conversion_event(:remove_known_trial_form_fields)
record_experiment_conversion_event(:trimmed_skip_trial_copy)
record_experiment_conversion_event(:trial_registration_with_social_signin)
......
......@@ -226,6 +226,9 @@ RSpec.describe TrialsController do
it { is_expected.to redirect_to("/#{namespace.path}?trial=true") }
it 'calls the record conversion method for the experiments' do
expect(controller).to receive(:record_experiment_user).with(:remove_known_trial_form_fields, namespace_id: namespace.id)
expect(controller).to receive(:record_experiment_user).with(:trimmed_skip_trial_copy, namespace_id: namespace.id)
expect(controller).to receive(:record_experiment_user).with(:trial_registration_with_social_signin, namespace_id: namespace.id)
expect(controller).to receive(:record_experiment_conversion_event).with(:remove_known_trial_form_fields)
expect(controller).to receive(:record_experiment_conversion_event).with(:trimmed_skip_trial_copy)
expect(controller).to receive(:record_experiment_conversion_event).with(:trial_registration_with_social_signin)
......
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