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 {
...
@@ -72,9 +72,6 @@ export default {
dismissCookieName
()
{
dismissCookieName
()
{
return
`
${
this
.
trackLabel
}
_
${
this
.
dismissKey
}
`
;
return
`
${
this
.
trackLabel
}
_
${
this
.
dismissKey
}
`
;
},
},
commitCookieName
()
{
return
`suggest_gitlab_ci_yml_commit_
${
this
.
dismissKey
}
`
;
},
},
},
mounted
()
{
mounted
()
{
if
(
if
(
...
...
app/assets/javascripts/main.js
View file @
21e3b8a4
...
@@ -106,7 +106,6 @@ function deferredInitialisation() {
...
@@ -106,7 +106,6 @@ function deferredInitialisation() {
initLogoAnimation
();
initLogoAnimation
();
initUsagePingConsent
();
initUsagePingConsent
();
initUserPopovers
();
initUserPopovers
();
initUserTracking
();
initBroadcastNotifications
();
initBroadcastNotifications
();
const
recoverySettingsCallout
=
document
.
querySelector
(
'
.js-recovery-settings-callout
'
);
const
recoverySettingsCallout
=
document
.
querySelector
(
'
.js-recovery-settings-callout
'
);
...
@@ -187,6 +186,7 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -187,6 +186,7 @@ document.addEventListener('DOMContentLoaded', () => {
if
(
document
.
querySelector
(
'
#js-peek
'
))
initPerformanceBar
({
container
:
'
#js-peek
'
});
if
(
document
.
querySelector
(
'
#js-peek
'
))
initPerformanceBar
({
container
:
'
#js-peek
'
});
initUserTracking
();
initLayoutNav
();
initLayoutNav
();
// Set the default path for all cookies to GitLab's root directory
// 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
initBlobBundle
from
'
~/blob_edit/blob_bundle
'
;
import
initPopover
from
'
~/blob/suggest_gitlab_ci_yml
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
initBlobBundle
);
initBlobBundle
();
const
suggestEl
=
document
.
querySelector
(
'
.js-suggest-gitlab-ci-yml
'
);
if
(
suggestEl
)
{
initPopover
(
suggestEl
);
}
});
spec/frontend/blob/pipeline_tour_success_modal_spec.js
View file @
21e3b8a4
...
@@ -12,8 +12,8 @@ describe('PipelineTourSuccessModal', () => {
...
@@ -12,8 +12,8 @@ describe('PipelineTourSuccessModal', () => {
beforeEach
(()
=>
{
beforeEach
(()
=>
{
document
.
body
.
dataset
.
page
=
'
projects:blob:show
'
;
document
.
body
.
dataset
.
page
=
'
projects:blob:show
'
;
trackingSpy
=
mockTracking
(
'
_category_
'
,
undefined
,
jest
.
spyOn
);
trackingSpy
=
mockTracking
(
'
_category_
'
,
undefined
,
jest
.
spyOn
);
wrapper
=
shallowMount
(
pipelineTourSuccess
,
{
wrapper
=
shallowMount
(
pipelineTourSuccess
,
{
propsData
:
modalProps
,
propsData
:
modalProps
,
stubs
:
{
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', () => {
...
@@ -69,8 +69,10 @@ describe('Suggest gitlab-ci.yml Popover', () => {
let
trackingSpy
;
let
trackingSpy
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
document
.
body
.
dataset
.
page
=
'
projects:blob:new
'
;
trackingSpy
=
mockTracking
(
'
_category_
'
,
undefined
,
jest
.
spyOn
);
createWrapper
(
commitTrackLabel
);
createWrapper
(
commitTrackLabel
);
trackingSpy
=
mockTracking
(
'
_category_
'
,
wrapper
.
element
,
jest
.
spyOn
);
});
});
afterEach
(()
=>
{
afterEach
(()
=>
{
...
@@ -83,10 +85,6 @@ describe('Suggest gitlab-ci.yml Popover', () => {
...
@@ -83,10 +85,6 @@ describe('Suggest gitlab-ci.yml Popover', () => {
const
expectedLabel
=
'
suggest_commit_first_project_gitlab_ci_yml
'
;
const
expectedLabel
=
'
suggest_commit_first_project_gitlab_ci_yml
'
;
const
expectedProperty
=
'
owner
'
;
const
expectedProperty
=
'
owner
'
;
document
.
body
.
dataset
.
page
=
'
projects:blob:new
'
;
wrapper
.
vm
.
trackOnShow
();
expect
(
trackingSpy
).
toHaveBeenCalledWith
(
expectedCategory
,
expectedAction
,
{
expect
(
trackingSpy
).
toHaveBeenCalledWith
(
expectedCategory
,
expectedAction
,
{
label
:
expectedLabel
,
label
:
expectedLabel
,
property
:
expectedProperty
,
property
:
expectedProperty
,
...
@@ -99,6 +97,7 @@ describe('Suggest gitlab-ci.yml Popover', () => {
...
@@ -99,6 +97,7 @@ describe('Suggest gitlab-ci.yml Popover', () => {
const
expectedProperty
=
'
owner
'
;
const
expectedProperty
=
'
owner
'
;
const
expectedValue
=
'
10
'
;
const
expectedValue
=
'
10
'
;
const
dismissButton
=
wrapper
.
find
(
GlDeprecatedButton
);
const
dismissButton
=
wrapper
.
find
(
GlDeprecatedButton
);
trackingSpy
=
mockTracking
(
'
_category_
'
,
wrapper
.
element
,
jest
.
spyOn
);
triggerEvent
(
dismissButton
.
element
);
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