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:
authorPhil Hughes <me@iamphill.com>2018-07-30 19:35:56 +0300
committerPhil Hughes <me@iamphill.com>2018-07-30 19:35:56 +0300
commitfd3ef2eb88d9d198d07c2761eac330e713a351b7 (patch)
tree1b24c96a2597022624c6bb9c0e2118ab4bd8acaf /spec/javascripts
parent3c62b51ce9de8b0cedc477fd3a5cab0b4de7766f (diff)
karma fixes
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/ide/components/new_dropdown/index_spec.js2
-rw-r--r--spec/javascripts/ide/components/new_dropdown/modal_spec.js2
-rw-r--r--spec/javascripts/ide/stores/modules/commit/actions_spec.js2
-rw-r--r--spec/javascripts/ide/stores/utils_spec.js9
4 files changed, 13 insertions, 2 deletions
diff --git a/spec/javascripts/ide/components/new_dropdown/index_spec.js b/spec/javascripts/ide/components/new_dropdown/index_spec.js
index 092c405a70b..84ae3ebe4d9 100644
--- a/spec/javascripts/ide/components/new_dropdown/index_spec.js
+++ b/spec/javascripts/ide/components/new_dropdown/index_spec.js
@@ -73,7 +73,7 @@ describe('new dropdown component', () => {
it('calls delete action', () => {
spyOn(vm, 'deleteEntry');
- vm.$el.querySelectorAll('.dropdown-menu button')[3].click();
+ vm.$el.querySelectorAll('.dropdown-menu button')[4].click();
expect(vm.deleteEntry).toHaveBeenCalledWith('');
});
diff --git a/spec/javascripts/ide/components/new_dropdown/modal_spec.js b/spec/javascripts/ide/components/new_dropdown/modal_spec.js
index ed9b3cd8a29..26346b9317b 100644
--- a/spec/javascripts/ide/components/new_dropdown/modal_spec.js
+++ b/spec/javascripts/ide/components/new_dropdown/modal_spec.js
@@ -45,7 +45,7 @@ describe('new file modal component', () => {
it('$emits create', () => {
spyOn(vm, 'createTempEntry');
- vm.createEntryInStore();
+ vm.submitForm();
expect(vm.createTempEntry).toHaveBeenCalledWith({
name: 'testing',
diff --git a/spec/javascripts/ide/stores/modules/commit/actions_spec.js b/spec/javascripts/ide/stores/modules/commit/actions_spec.js
index 133ad627f34..c8d9b38491c 100644
--- a/spec/javascripts/ide/stores/modules/commit/actions_spec.js
+++ b/spec/javascripts/ide/stores/modules/commit/actions_spec.js
@@ -297,6 +297,7 @@ describe('IDE commit module actions', () => {
content: jasmine.anything(),
encoding: jasmine.anything(),
last_commit_id: undefined,
+ previous_path: undefined,
},
],
start_branch: 'master',
@@ -323,6 +324,7 @@ describe('IDE commit module actions', () => {
content: jasmine.anything(),
encoding: jasmine.anything(),
last_commit_id: '123456789',
+ previous_path: undefined,
},
],
start_branch: undefined,
diff --git a/spec/javascripts/ide/stores/utils_spec.js b/spec/javascripts/ide/stores/utils_spec.js
index 89db50b8874..b7e0ec5392c 100644
--- a/spec/javascripts/ide/stores/utils_spec.js
+++ b/spec/javascripts/ide/stores/utils_spec.js
@@ -112,6 +112,7 @@ describe('Multi-file store utils', () => {
content: 'updated file content',
encoding: 'text',
last_commit_id: '123456789',
+ previous_path: undefined,
},
{
action: 'create',
@@ -119,6 +120,7 @@ describe('Multi-file store utils', () => {
content: 'new file content',
encoding: 'base64',
last_commit_id: '123456789',
+ previous_path: undefined,
},
{
action: 'delete',
@@ -126,6 +128,7 @@ describe('Multi-file store utils', () => {
content: '',
encoding: 'text',
last_commit_id: undefined,
+ previous_path: undefined,
},
],
start_branch: undefined,
@@ -172,6 +175,7 @@ describe('Multi-file store utils', () => {
content: 'updated file content',
encoding: 'text',
last_commit_id: '123456789',
+ previous_path: undefined,
},
{
action: 'create',
@@ -179,6 +183,7 @@ describe('Multi-file store utils', () => {
content: 'new file content',
encoding: 'base64',
last_commit_id: '123456789',
+ previous_path: undefined,
},
],
start_branch: undefined,
@@ -195,6 +200,10 @@ describe('Multi-file store utils', () => {
expect(utils.commitActionForFile({ tempFile: true })).toBe('create');
});
+ it('returns move for moved file', () => {
+ expect(utils.commitActionForFile({ prevPath: 'test' })).toBe('move');
+ });
+
it('returns update by default', () => {
expect(utils.commitActionForFile({})).toBe('update');
});