diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-18 00:07:45 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-18 00:07:45 +0000 |
commit | 7c077d960393e14b56d43cceaa7f609c703ac55f (patch) | |
tree | c3a5d79554b9be1d7434c8e9a8fcae35ab64af32 /spec/frontend/error_tracking | |
parent | da35510cdad8f8d3cb6c119682dc2735531983cd (diff) | |
download | gitlab-ce-7c077d960393e14b56d43cceaa7f609c703ac55f.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/error_tracking')
-rw-r--r-- | spec/frontend/error_tracking/utils_spec.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/frontend/error_tracking/utils_spec.js b/spec/frontend/error_tracking/utils_spec.js new file mode 100644 index 00000000000..0e9047cd375 --- /dev/null +++ b/spec/frontend/error_tracking/utils_spec.js @@ -0,0 +1,27 @@ +import * as errorTrackingUtils from '~/error_tracking/utils'; + +const externalUrl = 'https://sentry.io/organizations/test-sentry-nk/issues/1/?project=1'; + +describe('Error Tracking Events', () => { + describe('trackViewInSentryOptions', () => { + it('should return correct event options', () => { + expect(errorTrackingUtils.trackViewInSentryOptions(externalUrl)).toEqual({ + category: 'Error Tracking', + action: 'click_view_in_sentry', + label: 'External Url', + property: externalUrl, + }); + }); + }); + + describe('trackClickErrorLinkToSentryOptions', () => { + it('should return correct event options', () => { + expect(errorTrackingUtils.trackClickErrorLinkToSentryOptions(externalUrl)).toEqual({ + category: 'Error Tracking', + action: 'click_error_link_to_sentry', + label: 'Error Link', + property: externalUrl, + }); + }); + }); +}); |