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

fixed tree not rendering

parent 813ea768
......@@ -40,10 +40,8 @@
/>
</div>
</div>
<template v-if="branch.tree.length">
<repo-tree
:tree="branch.tree"
/>
</template>
<repo-tree
:tree="branch.tree"
/>
</div>
</template>
......@@ -2,7 +2,7 @@ import Vue from 'vue';
import store from 'ee/ide/stores';
import newDropdown from 'ee/ide/components/new_dropdown/index.vue';
import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper';
import { file, resetStore } from '../../helpers';
import { resetStore } from '../../helpers';
describe('new dropdown component', () => {
let vm;
......
......@@ -32,7 +32,7 @@ describe('RepoFile', () => {
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');
createComponent({
file: file('t3'),
......@@ -41,7 +41,11 @@ describe('RepoFile', () => {
vm.$el.querySelector('.file-name').click();
expect(router.push).toHaveBeenCalledWith(`/project${vm.file.url}`);
setTimeout(() => {
expect(router.push).toHaveBeenCalledWith(`/project${vm.file.url}`);
done();
});
});
describe('locked file', () => {
......@@ -67,7 +71,10 @@ describe('RepoFile', () => {
});
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