Welcome to mirror list, hosted at ThFree Co, Russian Federation.

track_learn_gitlab_spec.js « learn_gitlab « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3fb38a74c70b67ba0edbed1d8685debdee4d6309 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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',
      });
    });
  });
});