Commit ce68c060 authored by Maxime Orefice's avatar Maxime Orefice Committed by Andrew Fontaine

Track codequality report click

parent 38640295
......@@ -14,5 +14,5 @@
- if pipeline.downloadable_path_for_report_type(:codequality)
%li.js-codequality-tab-link
= link_to codequality_report_project_pipeline_path(project, pipeline), data: { target: '#js-tab-codequality', action: 'codequality_report', toggle: 'tab'}, class: 'codequality-tab' do
= link_to codequality_report_project_pipeline_path(project, pipeline), data: { target: '#js-tab-codequality', action: 'codequality_report', toggle: 'tab', 'track-event': 'click_button', 'track-label': 'get_codequality_report' }, class: 'codequality-tab' do
= _('Code Quality')
......@@ -200,6 +200,11 @@ RSpec.describe 'Pipeline', :js do
expect(page).to have_content('Function `simulateEvent` has 28 lines of code (exceeds 25 allowed). Consider refactoring.')
expect(find_link('app/assets/javascripts/test_utils/simulate_drag.js:1')[:href]).to end_with(project_blob_path(project, File.join(pipeline.commit.id, 'app/assets/javascripts/test_utils/simulate_drag.js')) + '#L1')
end
it 'contains events for data tracking', :aggregate_failures do
expect(page).to have_selector('[data-track-event="click_button"]')
expect(page).to have_selector('[data-track-label="get_codequality_report"]')
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