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
c5c6155b
Commit
c5c6155b
authored
Jun 10, 2020
by
Alex Buijs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Track event for onboarding issues experiment
Event tracked: popover_dismissed
parent
03310695
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
app/assets/javascripts/onboarding_issues/index.js
app/assets/javascripts/onboarding_issues/index.js
+2
-0
spec/frontend/onboarding_issues/index_spec.js
spec/frontend/onboarding_issues/index_spec.js
+9
-0
No files found.
app/assets/javascripts/onboarding_issues/index.js
View file @
c5c6155b
import
$
from
'
jquery
'
;
import
{
parseBoolean
,
getCookie
,
setCookie
,
removeCookie
}
from
'
~/lib/utils/common_utils
'
;
import
{
__
}
from
'
~/locale
'
;
import
Tracking
from
'
~/tracking
'
;
const
COOKIE_NAME
=
'
onboarding_issues_settings
'
;
...
...
@@ -18,6 +19,7 @@ function disposePopover(event) {
event
.
preventDefault
();
this
.
popover
(
'
dispose
'
);
removeLearnGitLabCookie
();
Tracking
.
event
(
'
Growth::Conversion::Experiment::OnboardingIssues
'
,
'
dismiss_popover
'
);
}
const
showPopover
=
(
el
,
path
,
footer
,
options
)
=>
{
...
...
spec/frontend/onboarding_issues/index_spec.js
View file @
c5c6155b
...
...
@@ -2,6 +2,7 @@ import $ from 'jquery';
import
{
showLearnGitLabIssuesPopover
}
from
'
~/onboarding_issues
'
;
import
{
getCookie
,
setCookie
,
removeCookie
}
from
'
~/lib/utils/common_utils
'
;
import
setWindowLocation
from
'
helpers/set_window_location_helper
'
;
import
Tracking
from
'
~/tracking
'
;
describe
(
'
Onboarding Issues Popovers
'
,
()
=>
{
const
COOKIE_NAME
=
'
onboarding_issues_settings
'
;
...
...
@@ -116,12 +117,20 @@ describe('Onboarding Issues Popovers', () => {
describe
(
'
when dismissing the popover
'
,
()
=>
{
beforeEach
(()
=>
{
jest
.
spyOn
(
Tracking
,
'
event
'
);
document
.
querySelector
(
'
.learn-gitlab.popover .close
'
).
click
();
});
it
(
'
deletes the cookie
'
,
()
=>
{
expect
(
getCookie
(
COOKIE_NAME
)).
toBe
(
undefined
);
});
it
(
'
sends a tracking event
'
,
()
=>
{
expect
(
Tracking
.
event
).
toHaveBeenCalledWith
(
'
Growth::Conversion::Experiment::OnboardingIssues
'
,
'
dismiss_popover
'
,
);
});
});
});
});
...
...
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