summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-05-04 14:01:16 +0100
committerPhil Hughes <me@iamphill.com>2018-05-04 14:01:16 +0100
commitf0ffc19ee7259004df6cb45cf2c610fef224efe9 (patch)
tree985e1510f01b3fe2c25254b83e09bf770bdb0bb4
parent80617b9039ccbeeec07e299e41690be6ce2d95ec (diff)
parent805302c0c09f0c6a3226efd2d3fca1b46015f9e0 (diff)
downloadgitlab-ce-f0ffc19ee7259004df6cb45cf2c610fef224efe9.tar.gz
Merge branch '44846-improve-web-ide-left-panel-and-modes' into ide-sidebar-commit-box
-rw-r--r--app/assets/javascripts/ide/stores/getters.js6
-rw-r--r--spec/javascripts/ide/components/repo_file_spec.js60
2 files changed, 30 insertions, 36 deletions
diff --git a/app/assets/javascripts/ide/stores/getters.js b/app/assets/javascripts/ide/stores/getters.js
index 28e08c2b679..75286ed0cd2 100644
--- a/app/assets/javascripts/ide/stores/getters.js
+++ b/app/assets/javascripts/ide/stores/getters.js
@@ -1,9 +1,5 @@
-<<<<<<< HEAD
-import { activityBarViews } from '../constants';
-=======
-import { __ } from '~/locale';
import { getChangesCountForFiles, filePathMatches } from './utils';
->>>>>>> master
+import { activityBarViews } from '../constants';
export const activeFile = state => state.openFiles.find(file => file.active) || null;
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');
+ });
+ });
});