Commit 786d0660 authored by Doug Stull's avatar Doug Stull

Add tracking to clicking buy ci minutes

- track
parent c3437e66
- return unless show_buy_ci_minutes?
%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")
= emoji_icon('clock9', 'aria-hidden': true)
......@@ -16,7 +16,10 @@ describe 'layouts/header/_current_user_dropdown' do
subject { rendered }
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')
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