diff options
author | Phil Hughes <me@iamphill.com> | 2018-04-18 14:59:24 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-04-18 14:59:24 +0100 |
commit | 1e3a3618be7dcf0b3d7bee35af6a820e01d98fef (patch) | |
tree | f1ef8569ce4f7eca7f62259679b1f654f6940b34 | |
parent | 8673a2cae1bb166a20019d4f4bc2a1498fcf8525 (diff) | |
download | gitlab-ce-1e3a3618be7dcf0b3d7bee35af6a820e01d98fef.tar.gz |
fixed ide_spec.js
-rw-r--r-- | spec/javascripts/ide/components/ide_spec.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/javascripts/ide/components/ide_spec.js b/spec/javascripts/ide/components/ide_spec.js index 5bd890094cc..2a49adc5740 100644 --- a/spec/javascripts/ide/components/ide_spec.js +++ b/spec/javascripts/ide/components/ide_spec.js @@ -3,6 +3,7 @@ import store from '~/ide/stores'; import ide from '~/ide/components/ide.vue'; import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { file, resetStore } from '../helpers'; +import { projectData } from '../mock_data'; describe('ide component', () => { let vm; @@ -10,6 +11,10 @@ describe('ide component', () => { beforeEach(() => { const Component = Vue.extend(ide); + store.state.currentProjectId = 'abcproject'; + store.state.currentBranchId = 'master'; + store.state.projects.abcproject = Object.assign({}, projectData); + vm = createComponentWithStore(Component, store, { emptyStateSvgPath: 'svg', noChangesStateSvgPath: 'svg', @@ -23,11 +28,11 @@ describe('ide component', () => { resetStore(vm.$store); }); - it('does not render panel right when no files open', () => { + it('does not render right right when no files open', () => { expect(vm.$el.querySelector('.panel-right')).toBeNull(); }); - it('renders panel right when files are open', done => { + it('renders right panel when files are open', done => { vm.$store.state.trees['abcproject/mybranch'] = { tree: [file()], }; |