diff options
Diffstat (limited to 'spec/frontend/ide/components/commit_sidebar/list_collapsed_spec.js')
-rw-r--r-- | spec/frontend/ide/components/commit_sidebar/list_collapsed_spec.js | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/spec/frontend/ide/components/commit_sidebar/list_collapsed_spec.js b/spec/frontend/ide/components/commit_sidebar/list_collapsed_spec.js deleted file mode 100644 index 42e0a20bc7b..00000000000 --- a/spec/frontend/ide/components/commit_sidebar/list_collapsed_spec.js +++ /dev/null @@ -1,75 +0,0 @@ -import Vue from 'vue'; -import { createComponentWithStore } from 'helpers/vue_mount_component_helper'; -import { createStore } from '~/ide/stores'; -import listCollapsed from '~/ide/components/commit_sidebar/list_collapsed.vue'; -import { file } from '../../helpers'; -import { removeWhitespace } from '../../../helpers/text_helper'; - -describe('Multi-file editor commit sidebar list collapsed', () => { - let vm; - let store; - - beforeEach(() => { - store = createStore(); - - const Component = Vue.extend(listCollapsed); - - vm = createComponentWithStore(Component, store, { - files: [ - { - ...file('file1'), - tempFile: true, - }, - file('file2'), - ], - iconName: 'staged', - title: 'Staged', - }); - - vm.$mount(); - }); - - afterEach(() => { - vm.$destroy(); - }); - - it('renders added & modified files count', () => { - expect(removeWhitespace(vm.$el.textContent).trim()).toBe('1 1'); - }); - - describe('addedFilesLength', () => { - it('returns an length of temp files', () => { - expect(vm.addedFilesLength).toBe(1); - }); - }); - - describe('modifiedFilesLength', () => { - it('returns an length of modified files', () => { - expect(vm.modifiedFilesLength).toBe(1); - }); - }); - - describe('addedFilesIconClass', () => { - it('includes multi-file-addition when addedFiles is not empty', () => { - expect(vm.addedFilesIconClass).toContain('multi-file-addition'); - }); - - it('excludes multi-file-addition when addedFiles is empty', () => { - vm.files = []; - - expect(vm.addedFilesIconClass).not.toContain('multi-file-addition'); - }); - }); - - describe('modifiedFilesClass', () => { - it('includes multi-file-modified when addedFiles is not empty', () => { - expect(vm.modifiedFilesClass).toContain('multi-file-modified'); - }); - - it('excludes multi-file-modified when addedFiles is empty', () => { - vm.files = []; - - expect(vm.modifiedFilesClass).not.toContain('multi-file-modified'); - }); - }); -}); |