Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
786d0660
Commit
786d0660
authored
Mar 31, 2020
by
Doug Stull
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tracking to clicking buy ci minutes
- track
parent
c3437e66
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
ee/app/views/layouts/header/_buy_ci_minutes.html.haml
ee/app/views/layouts/header/_buy_ci_minutes.html.haml
+3
-1
ee/spec/views/layouts/header/_current_user_dropdown.html.haml_spec.rb
...s/layouts/header/_current_user_dropdown.html.haml_spec.rb
+4
-1
No files found.
ee/app/views/layouts/header/_buy_ci_minutes.html.haml
View file @
786d0660
-
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
)
ee/spec/views/layouts/header/_current_user_dropdown.html.haml_spec.rb
View file @
786d0660
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment