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
link_to invite_members_url(form_model),
data: {
'track-event': 'click_link',
'track-label': tracking_label(current_user),
'track-property': experiment_tracking_category_and_group(:invite_members_new_dropdown, subject: current_user)
'track-label': tracking_label,
'track-property': experiment_tracking_category_and_group(:invite_members_new_dropdown)
} do
invite_member_link_content
end
......
---
name: invite_members_new_dropdown_experiment_percentage
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'
type: experiment
group: group::expansion
......
......@@ -123,7 +123,7 @@ RSpec.describe InviteMembersHelper do
before do
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 }
end
......@@ -132,8 +132,7 @@ RSpec.describe InviteMembersHelper do
helper.dropdown_invite_members_link(form_model)
expect(helper).to have_received(:experiment_tracking_category_and_group)
.with(:invite_members_new_dropdown, subject: owner)
expect(helper).to have_received(:experiment_tracking_category_and_group).with(:invite_members_new_dropdown)
end
context 'with experiment enabled' do
......
......@@ -10,7 +10,7 @@ RSpec.describe 'layouts/header/_new_dropdown' do
before do
allow(Gitlab::Experimentation).to receive(:active?).and_return(true)
allow(view).to receive(:experiment_tracking_category_and_group)
allow(view).to receive(:tracking_label).with(user)
allow(view).to receive(:tracking_label)
end
context 'with ability to invite members' do
......@@ -20,8 +20,8 @@ RSpec.describe 'layouts/header/_new_dropdown' do
subject
expect(view).to have_received(:experiment_tracking_category_and_group)
.with(:invite_members_new_dropdown, subject: user)
expect(view).to have_received(:tracking_label).with(user)
.with(:invite_members_new_dropdown)
expect(view).to have_received(:tracking_label)
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