diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-01 00:10:23 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-01 00:10:23 +0300 |
commit | 07de48228886ca6afa348c92f8689b9027e4c195 (patch) | |
tree | a3ba7bae1edb47180352d080136141af40a3e8a2 /spec/frontend/learn_gitlab | |
parent | d899d2a373f8be3d94760299faafa19c3c432c1e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/learn_gitlab')
-rw-r--r-- | spec/frontend/learn_gitlab/track_learn_gitlab_spec.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/frontend/learn_gitlab/track_learn_gitlab_spec.js b/spec/frontend/learn_gitlab/track_learn_gitlab_spec.js new file mode 100644 index 00000000000..3fb38a74c70 --- /dev/null +++ b/spec/frontend/learn_gitlab/track_learn_gitlab_spec.js @@ -0,0 +1,21 @@ +import { mockTracking } from 'helpers/tracking_helper'; +import trackLearnGitlab from '~/learn_gitlab/track_learn_gitlab'; + +describe('trackTrialUserErrors', () => { + let spy; + + describe('when an error is present', () => { + beforeEach(() => { + spy = mockTracking('projects:learn_gitlab_index', document.body, jest.spyOn); + }); + + it('tracks the error message', () => { + trackLearnGitlab(); + + expect(spy).toHaveBeenCalledWith('projects:learn_gitlab:index', 'page_init', { + label: 'learn_gitlab', + property: 'Growth::Activation::Experiment::LearnGitLabB', + }); + }); + }); +}); |