Commit 7916beef authored by Alper Akgun's avatar Alper Akgun

Merge branch 'fix-invite-members-new-dropdown-tracking' into 'master'

Fix tracking property on invite members link

See merge request gitlab-org/gitlab!51924
parents 51468201 071f3463
...@@ -27,8 +27,8 @@ module InviteMembersHelper ...@@ -27,8 +27,8 @@ module InviteMembersHelper
link_to invite_members_url(form_model), link_to invite_members_url(form_model),
data: { data: {
'track-event': 'click_link', 'track-event': 'click_link',
'track-label': tracking_label(current_user), 'track-label': tracking_label,
'track-property': experiment_tracking_category_and_group(:invite_members_new_dropdown, subject: current_user) 'track-property': experiment_tracking_category_and_group(:invite_members_new_dropdown)
} do } do
invite_member_link_content invite_member_link_content
end end
......
--- ---
name: invite_members_new_dropdown_experiment_percentage name: invite_members_new_dropdown_experiment_percentage
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/50069 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/50069
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/268129 rollout_issue_url: https://gitlab.com/gitlab-org/growth/team-tasks/-/issues/291
milestone: '13.8' milestone: '13.8'
type: experiment type: experiment
group: group::expansion group: group::expansion
......
...@@ -123,7 +123,7 @@ RSpec.describe InviteMembersHelper do ...@@ -123,7 +123,7 @@ RSpec.describe InviteMembersHelper do
before do before do
allow(helper).to receive(:experiment_tracking_category_and_group) { '_track_property_' } allow(helper).to receive(:experiment_tracking_category_and_group) { '_track_property_' }
allow(helper).to receive(:tracking_label).with(owner) allow(helper).to receive(:tracking_label)
allow(helper).to receive(:current_user) { owner } allow(helper).to receive(:current_user) { owner }
end end
...@@ -132,8 +132,7 @@ RSpec.describe InviteMembersHelper do ...@@ -132,8 +132,7 @@ RSpec.describe InviteMembersHelper do
helper.dropdown_invite_members_link(form_model) helper.dropdown_invite_members_link(form_model)
expect(helper).to have_received(:experiment_tracking_category_and_group) expect(helper).to have_received(:experiment_tracking_category_and_group).with(:invite_members_new_dropdown)
.with(:invite_members_new_dropdown, subject: owner)
end end
context 'with experiment enabled' do context 'with experiment enabled' do
......
...@@ -10,7 +10,7 @@ RSpec.describe 'layouts/header/_new_dropdown' do ...@@ -10,7 +10,7 @@ RSpec.describe 'layouts/header/_new_dropdown' do
before do before do
allow(Gitlab::Experimentation).to receive(:active?).and_return(true) allow(Gitlab::Experimentation).to receive(:active?).and_return(true)
allow(view).to receive(:experiment_tracking_category_and_group) allow(view).to receive(:experiment_tracking_category_and_group)
allow(view).to receive(:tracking_label).with(user) allow(view).to receive(:tracking_label)
end end
context 'with ability to invite members' do context 'with ability to invite members' do
...@@ -20,8 +20,8 @@ RSpec.describe 'layouts/header/_new_dropdown' do ...@@ -20,8 +20,8 @@ RSpec.describe 'layouts/header/_new_dropdown' do
subject subject
expect(view).to have_received(:experiment_tracking_category_and_group) expect(view).to have_received(:experiment_tracking_category_and_group)
.with(:invite_members_new_dropdown, subject: user) .with(:invite_members_new_dropdown)
expect(view).to have_received(:tracking_label).with(user) expect(view).to have_received(:tracking_label)
end end
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