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
400d9134
Commit
400d9134
authored
Jan 04, 2022
by
Jannik Lehmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tracking counter to mr_license_compliance_widget_body
parent
94e9562a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
ee/app/assets/javascripts/vue_shared/license_compliance/components/license_issue_body.vue
...ared/license_compliance/components/license_issue_body.vue
+2
-1
ee/spec/frontend/vue_shared/license_compliance/components/license_issue_body_spec.js
.../license_compliance/components/license_issue_body_spec.js
+8
-4
No files found.
ee/app/assets/javascripts/vue_shared/license_compliance/components/license_issue_body.vue
View file @
400d9134
<
script
>
import
{
GlLink
}
from
'
@gitlab/ui
'
;
import
{
mapActions
}
from
'
vuex
'
;
import
{
GlLink
}
from
'
@gitlab/ui
'
;
import
api
from
'
~/api
'
;
import
{
LICENSE_MANAGEMENT
}
from
'
ee/vue_shared/license_compliance/store/constants
'
;
...
...
@@ -25,6 +25,7 @@ export default {
...
mapActions
(
LICENSE_MANAGEMENT
,
[
'
setLicenseInModal
'
]),
trackLinkClick
()
{
api
.
trackRedisHllUserEvent
(
LICENSE_LINK_TELEMETRY_EVENT
);
api
.
trackRedisCounterEvent
(
LICENSE_LINK_TELEMETRY_EVENT
);
},
},
};
...
...
ee/spec/frontend/vue_shared/license_compliance/components/license_issue_body_spec.js
View file @
400d9134
...
...
@@ -83,20 +83,24 @@ describe('LicenseIssueBody', () => {
});
describe
(
'
event tracking
'
,
()
=>
{
let
trackEventSpy
;
let
trackUserEventSpy
;
let
trackCounterEventSpy
;
beforeEach
(()
=>
{
trackEventSpy
=
jest
.
spyOn
(
api
,
'
trackRedisHllUserEvent
'
).
mockImplementation
(()
=>
{});
trackUserEventSpy
=
jest
.
spyOn
(
api
,
'
trackRedisHllUserEvent
'
).
mockImplementation
(()
=>
{});
trackCounterEventSpy
=
jest
.
spyOn
(
api
,
'
trackRedisCounterEvent
'
).
mockImplementation
(()
=>
{});
});
afterEach
(()
=>
{
trackEventSpy
.
mockRestore
();
trackUserEventSpy
.
mockRestore
();
trackCounterEventSpy
.
mockRestore
();
});
it
(
'
tracks users_visiting_testing_license_compliance_full_report
'
,
()
=>
{
findGlLink
().
vm
.
$emit
(
'
click
'
);
expect
(
trackEventSpy
).
toHaveBeenCalledWith
(
LICENSE_LINK_TELEMETRY_EVENT
);
expect
(
trackUserEventSpy
).
toHaveBeenCalledWith
(
LICENSE_LINK_TELEMETRY_EVENT
);
expect
(
trackCounterEventSpy
).
toHaveBeenCalledWith
(
LICENSE_LINK_TELEMETRY_EVENT
);
});
});
});
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