diff options
Diffstat (limited to 'spec/javascripts/diffs/components/tree_list_spec.js')
-rw-r--r-- | spec/javascripts/diffs/components/tree_list_spec.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/javascripts/diffs/components/tree_list_spec.js b/spec/javascripts/diffs/components/tree_list_spec.js index 9e556698f34..cd7bf6405e5 100644 --- a/spec/javascripts/diffs/components/tree_list_spec.js +++ b/spec/javascripts/diffs/components/tree_list_spec.js @@ -28,7 +28,7 @@ describe('Diffs tree list component', () => { localStorage.removeItem('mr_diff_tree_list'); - vm = mountComponentWithStore(Component, { store }); + vm = mountComponentWithStore(Component, { store, props: { hideFileStats: false } }); }); afterEach(() => { @@ -77,6 +77,16 @@ describe('Diffs tree list component', () => { expect(vm.$el.querySelectorAll('.file-row')[1].textContent).toContain('app'); }); + it('hides file stats', done => { + vm.hideFileStats = true; + + vm.$nextTick(() => { + expect(vm.$el.querySelector('.file-row-stats')).toBe(null); + + done(); + }); + }); + it('calls toggleTreeOpen when clicking folder', () => { spyOn(vm.$store, 'dispatch').and.stub(); |