From 805302c0c09f0c6a3226efd2d3fca1b46015f9e0 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Fri, 4 May 2018 13:59:02 +0100 Subject: fixed duplicated tests --- spec/javascripts/ide/components/repo_file_spec.js | 60 +++++++++++------------ 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/spec/javascripts/ide/components/repo_file_spec.js b/spec/javascripts/ide/components/repo_file_spec.js index fbef10c90e8..156233653ab 100644 --- a/spec/javascripts/ide/components/repo_file_spec.js +++ b/spec/javascripts/ide/components/repo_file_spec.js @@ -73,38 +73,7 @@ describe('RepoFile', () => { expect(treeChangesEl).not.toBeNull(); expect(treeChangesEl.textContent).toContain('1'); }); - }); - - describe('locked file', () => { - let f; - - beforeEach(() => { - f = file('locked file'); - f.file_lock = { - user: { - name: 'testuser', - updated_at: new Date(), - }, - }; - - createComponent({ - file: f, - level: 0, - }); - }); - - it('renders lock icon', () => { - expect(vm.$el.querySelector('.file-status-icon')).not.toBeNull(); - }); - - it('renders a tooltip', () => { - expect( - vm.$el.querySelector('.ide-file-name span:nth-child(2)').dataset.originalTitle, - ).toContain('Locked by testuser'); - }); - }); - describe('folder', () => { it('renders action dropdown', done => { createComponent({ file: { @@ -142,4 +111,33 @@ describe('RepoFile', () => { }); }); }); + + describe('locked file', () => { + let f; + + beforeEach(() => { + f = file('locked file'); + f.file_lock = { + user: { + name: 'testuser', + updated_at: new Date(), + }, + }; + + createComponent({ + file: f, + level: 0, + }); + }); + + it('renders lock icon', () => { + expect(vm.$el.querySelector('.file-status-icon')).not.toBeNull(); + }); + + it('renders a tooltip', () => { + expect( + vm.$el.querySelector('.ide-file-name span:nth-child(2)').dataset.originalTitle, + ).toContain('Locked by testuser'); + }); + }); }); -- cgit v1.2.1