Commit b32946d5 authored by Mike Greiling's avatar Mike Greiling

Merge branch 'track-buy-ci-minutes-click' into 'master'

Add tracking to clicking buy ci minutes

Closes gitlab-org/growth/product#1495

See merge request gitlab-org/gitlab!28476
parents 92832855 786d0660
- return unless show_buy_ci_minutes? - return unless show_buy_ci_minutes?
%li %li
= link_to profile_pipeline_quota_path, class: 'ci-minutes-emoji' do = link_to profile_pipeline_quota_path,
class: 'ci-minutes-emoji',
data: { 'track-event': 'click_buy_ci_minutes', 'track-label': current_user.namespace.actual_plan_name, 'track-property': 'user_dropdown' } do
= s_("CurrentUser|Buy CI minutes") = s_("CurrentUser|Buy CI minutes")
= emoji_icon('clock9', 'aria-hidden': true) = emoji_icon('clock9', 'aria-hidden': true)
...@@ -16,7 +16,10 @@ describe 'layouts/header/_current_user_dropdown' do ...@@ -16,7 +16,10 @@ describe 'layouts/header/_current_user_dropdown' do
subject { rendered } subject { rendered }
context 'when ci minutes need bought' do context 'when ci minutes need bought' do
it 'has "Buy CI minutes" link' do it 'has "Buy CI minutes" link with correct data properties', :aggregate_failures do
expect(subject).to have_selector('[data-track-event="click_buy_ci_minutes"]')
expect(subject).to have_selector("[data-track-label='#{user.namespace.actual_plan_name}']")
expect(subject).to have_selector('[data-track-property="user_dropdown"]')
expect(subject).to have_link('Buy CI minutes') expect(subject).to have_link('Buy CI minutes')
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