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
21e3b8a4
Commit
21e3b8a4
authored
May 07, 2020
by
Doug Stull
Committed by
Martin Wortschack
May 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to use the render track event
- automatic tracking because the this.track seems to not be going through
parent
877b8f2c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
20 deletions
+7
-20
app/assets/javascripts/blob/suggest_gitlab_ci_yml/components/popover.vue
...scripts/blob/suggest_gitlab_ci_yml/components/popover.vue
+0
-3
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+1
-1
app/assets/javascripts/pages/projects/blob/new/index.js
app/assets/javascripts/pages/projects/blob/new/index.js
+1
-10
spec/frontend/blob/pipeline_tour_success_modal_spec.js
spec/frontend/blob/pipeline_tour_success_modal_spec.js
+1
-1
spec/frontend/blob/suggest_gitlab_ci_yml/components/popover_spec.js
...end/blob/suggest_gitlab_ci_yml/components/popover_spec.js
+4
-5
No files found.
app/assets/javascripts/blob/suggest_gitlab_ci_yml/components/popover.vue
View file @
21e3b8a4
...
...
@@ -72,9 +72,6 @@ export default {
dismissCookieName
()
{
return
`
${
this
.
trackLabel
}
_
${
this
.
dismissKey
}
`
;
},
commitCookieName
()
{
return
`suggest_gitlab_ci_yml_commit_
${
this
.
dismissKey
}
`
;
},
},
mounted
()
{
if
(
...
...
app/assets/javascripts/main.js
View file @
21e3b8a4
...
...
@@ -106,7 +106,6 @@ function deferredInitialisation() {
initLogoAnimation
();
initUsagePingConsent
();
initUserPopovers
();
initUserTracking
();
initBroadcastNotifications
();
const
recoverySettingsCallout
=
document
.
querySelector
(
'
.js-recovery-settings-callout
'
);
...
...
@@ -187,6 +186,7 @@ document.addEventListener('DOMContentLoaded', () => {
if
(
document
.
querySelector
(
'
#js-peek
'
))
initPerformanceBar
({
container
:
'
#js-peek
'
});
initUserTracking
();
initLayoutNav
();
// Set the default path for all cookies to GitLab's root directory
...
...
app/assets/javascripts/pages/projects/blob/new/index.js
View file @
21e3b8a4
import
initBlobBundle
from
'
~/blob_edit/blob_bundle
'
;
import
initPopover
from
'
~/blob/suggest_gitlab_ci_yml
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
initBlobBundle
();
const
suggestEl
=
document
.
querySelector
(
'
.js-suggest-gitlab-ci-yml
'
);
if
(
suggestEl
)
{
initPopover
(
suggestEl
);
}
});
document
.
addEventListener
(
'
DOMContentLoaded
'
,
initBlobBundle
);
spec/frontend/blob/pipeline_tour_success_modal_spec.js
View file @
21e3b8a4
...
...
@@ -12,8 +12,8 @@ describe('PipelineTourSuccessModal', () => {
beforeEach
(()
=>
{
document
.
body
.
dataset
.
page
=
'
projects:blob:show
'
;
trackingSpy
=
mockTracking
(
'
_category_
'
,
undefined
,
jest
.
spyOn
);
wrapper
=
shallowMount
(
pipelineTourSuccess
,
{
propsData
:
modalProps
,
stubs
:
{
...
...
spec/frontend/blob/suggest_gitlab_ci_yml/components/popover_spec.js
View file @
21e3b8a4
...
...
@@ -69,8 +69,10 @@ describe('Suggest gitlab-ci.yml Popover', () => {
let
trackingSpy
;
beforeEach
(()
=>
{
document
.
body
.
dataset
.
page
=
'
projects:blob:new
'
;
trackingSpy
=
mockTracking
(
'
_category_
'
,
undefined
,
jest
.
spyOn
);
createWrapper
(
commitTrackLabel
);
trackingSpy
=
mockTracking
(
'
_category_
'
,
wrapper
.
element
,
jest
.
spyOn
);
});
afterEach
(()
=>
{
...
...
@@ -83,10 +85,6 @@ describe('Suggest gitlab-ci.yml Popover', () => {
const
expectedLabel
=
'
suggest_commit_first_project_gitlab_ci_yml
'
;
const
expectedProperty
=
'
owner
'
;
document
.
body
.
dataset
.
page
=
'
projects:blob:new
'
;
wrapper
.
vm
.
trackOnShow
();
expect
(
trackingSpy
).
toHaveBeenCalledWith
(
expectedCategory
,
expectedAction
,
{
label
:
expectedLabel
,
property
:
expectedProperty
,
...
...
@@ -99,6 +97,7 @@ describe('Suggest gitlab-ci.yml Popover', () => {
const
expectedProperty
=
'
owner
'
;
const
expectedValue
=
'
10
'
;
const
dismissButton
=
wrapper
.
find
(
GlDeprecatedButton
);
trackingSpy
=
mockTracking
(
'
_category_
'
,
wrapper
.
element
,
jest
.
spyOn
);
triggerEvent
(
dismissButton
.
element
);
...
...
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