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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/ide/stores/modules/commit/actions_spec.js')
-rw-r--r--spec/frontend/ide/stores/modules/commit/actions_spec.js66
1 files changed, 0 insertions, 66 deletions
diff --git a/spec/frontend/ide/stores/modules/commit/actions_spec.js b/spec/frontend/ide/stores/modules/commit/actions_spec.js
index 872aa9b6e6b..3eaff92d321 100644
--- a/spec/frontend/ide/stores/modules/commit/actions_spec.js
+++ b/spec/frontend/ide/stores/modules/commit/actions_spec.js
@@ -1,7 +1,6 @@
import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
import testAction from 'helpers/vuex_action_helper';
-import { mockTracking, unmockTracking } from 'helpers/tracking_helper';
import { file } from 'jest/ide/helpers';
import { commitActionTypes, PERMISSION_CREATE_MR } from '~/ide/constants';
import eventHub from '~/ide/eventhub';
@@ -40,14 +39,12 @@ describe('IDE commit module actions', () => {
let mock;
let store;
let router;
- let trackingSpy;
beforeEach(() => {
store = createStore();
router = createRouter(store);
gon.api_version = 'v1';
mock = new MockAdapter(axios);
- trackingSpy = mockTracking(undefined, undefined, jest.spyOn);
jest.spyOn(router, 'push').mockImplementation();
mock
@@ -56,7 +53,6 @@ describe('IDE commit module actions', () => {
});
afterEach(() => {
- unmockTracking();
mock.restore();
});
@@ -426,28 +422,6 @@ describe('IDE commit module actions', () => {
});
});
});
-
- describe('learnGitlabSource', () => {
- describe('learnGitlabSource is true', () => {
- it('tracks commit', async () => {
- store.state.learnGitlabSource = true;
-
- await store.dispatch('commit/commitChanges');
-
- expect(trackingSpy).toHaveBeenCalledWith(undefined, 'commit', {
- label: 'web_ide_learn_gitlab_source',
- });
- });
- });
-
- describe('learnGitlabSource is false', () => {
- it('does not track commit', async () => {
- await store.dispatch('commit/commitChanges');
-
- expect(trackingSpy).not.toHaveBeenCalled();
- });
- });
- });
});
describe('success response with failed message', () => {
@@ -465,26 +439,6 @@ describe('IDE commit module actions', () => {
expect(alert.textContent.trim()).toBe('failed message');
});
-
- describe('learnGitlabSource', () => {
- describe('learnGitlabSource is true', () => {
- it('does not track commit', async () => {
- store.state.learnGitlabSource = true;
-
- await store.dispatch('commit/commitChanges');
-
- expect(trackingSpy).not.toHaveBeenCalled();
- });
- });
-
- describe('learnGitlabSource is false', () => {
- it('does not track commit', async () => {
- await store.dispatch('commit/commitChanges');
-
- expect(trackingSpy).not.toHaveBeenCalled();
- });
- });
- });
});
describe('failed response', () => {
@@ -504,26 +458,6 @@ describe('IDE commit module actions', () => {
['commit/SET_ERROR', createUnexpectedCommitError(), undefined],
]);
});
-
- describe('learnGitlabSource', () => {
- describe('learnGitlabSource is true', () => {
- it('does not track commit', async () => {
- store.state.learnGitlabSource = true;
-
- await store.dispatch('commit/commitChanges').catch(() => {});
-
- expect(trackingSpy).not.toHaveBeenCalled();
- });
- });
-
- describe('learnGitlabSource is false', () => {
- it('does not track commit', async () => {
- await store.dispatch('commit/commitChanges').catch(() => {});
-
- expect(trackingSpy).not.toHaveBeenCalled();
- });
- });
- });
});
describe('first commit of a branch', () => {