summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-05-04 13:59:02 +0100
committerPhil Hughes <me@iamphill.com>2018-05-04 13:59:02 +0100
commit805302c0c09f0c6a3226efd2d3fca1b46015f9e0 (patch)
tree4f0bf32a589007b92b9d8202b7eb60bc57fa7ae8
parent64807dd87a160a716ad28d4a593a35d7fb6d1e5c (diff)
downloadgitlab-ce-805302c0c09f0c6a3226efd2d3fca1b46015f9e0.tar.gz
fixed duplicated tests
-rw-r--r--spec/javascripts/ide/components/repo_file_spec.js60
1 files 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');
+ });
+ });
});