Commit 816b4202 authored by Phil Hughes's avatar Phil Hughes

fixed tree not rendering

parent 813ea768
...@@ -40,10 +40,8 @@ ...@@ -40,10 +40,8 @@
/> />
</div> </div>
</div> </div>
<template v-if="branch.tree.length">
<repo-tree <repo-tree
:tree="branch.tree" :tree="branch.tree"
/> />
</template>
</div> </div>
</template> </template>
...@@ -2,7 +2,7 @@ import Vue from 'vue'; ...@@ -2,7 +2,7 @@ import Vue from 'vue';
import store from 'ee/ide/stores'; import store from 'ee/ide/stores';
import newDropdown from 'ee/ide/components/new_dropdown/index.vue'; import newDropdown from 'ee/ide/components/new_dropdown/index.vue';
import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper';
import { file, resetStore } from '../../helpers'; import { resetStore } from '../../helpers';
describe('new dropdown component', () => { describe('new dropdown component', () => {
let vm; let vm;
......
...@@ -32,7 +32,7 @@ describe('RepoFile', () => { ...@@ -32,7 +32,7 @@ describe('RepoFile', () => {
expect(name.textContent.trim()).toEqual(vm.file.name); expect(name.textContent.trim()).toEqual(vm.file.name);
}); });
it('fires clickFile when the link is clicked', () => { it('fires clickFile when the link is clicked', done => {
spyOn(router, 'push'); spyOn(router, 'push');
createComponent({ createComponent({
file: file('t3'), file: file('t3'),
...@@ -41,7 +41,11 @@ describe('RepoFile', () => { ...@@ -41,7 +41,11 @@ describe('RepoFile', () => {
vm.$el.querySelector('.file-name').click(); vm.$el.querySelector('.file-name').click();
setTimeout(() => {
expect(router.push).toHaveBeenCalledWith(`/project${vm.file.url}`); expect(router.push).toHaveBeenCalledWith(`/project${vm.file.url}`);
done();
});
}); });
describe('locked file', () => { describe('locked file', () => {
...@@ -67,7 +71,10 @@ describe('RepoFile', () => { ...@@ -67,7 +71,10 @@ describe('RepoFile', () => {
}); });
it('renders a tooltip', () => { it('renders a tooltip', () => {
expect(vm.$el.querySelector('.ide-file-name span:nth-child(2)').dataset.originalTitle).toContain('Locked by testuser'); expect(
vm.$el.querySelector('.ide-file-name span:nth-child(2)').dataset
.originalTitle,
).toContain('Locked by testuser');
}); });
}); });
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment