diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2017-06-07 10:05:17 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2017-06-07 10:05:17 -0500 |
commit | a65f07a256b95ce1c38342518f9469cbf3abf609 (patch) | |
tree | b0a1c52b17b67442c6b8e003bcc1fe1dc9dd061a | |
parent | a7936b2f39bd795850dd40ed435e06484e58c4c0 (diff) | |
download | gitlab-ce-a65f07a256b95ce1c38342518f9469cbf3abf609.tar.gz |
Address feedback
-rw-r--r-- | app/assets/javascripts/groups/index.js | 3 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/lists.scss | 1 | ||||
-rw-r--r-- | config/webpack.config.js | 1 | ||||
-rw-r--r-- | spec/javascripts/groups/group_item_spec.js | 4 | ||||
-rw-r--r-- | spec/javascripts/groups/groups_spec.js | 4 | ||||
-rw-r--r-- | spec/javascripts/lib/utils/common_utils_spec.js | 8 |
6 files changed, 18 insertions, 3 deletions
diff --git a/app/assets/javascripts/groups/index.js b/app/assets/javascripts/groups/index.js index 1ab565ccccb..508590f8676 100644 --- a/app/assets/javascripts/groups/index.js +++ b/app/assets/javascripts/groups/index.js @@ -1,7 +1,6 @@ /* global Flash */ import Vue from 'vue'; -import GroupsList from '~/groups_list'; import GroupFilterableList from './groups_filterable_list'; import GroupsComponent from './components/groups.vue'; import GroupFolder from './components/group_folder.vue'; @@ -181,6 +180,6 @@ document.addEventListener('DOMContentLoaded', () => { eventHub.$off('leaveGroup', this.leaveGroup); eventHub.$off('updateGroups', this.updateGroups); eventHub.$off('updatePagination', this.updatePagination); - } + }, }); }); diff --git a/app/assets/stylesheets/framework/lists.scss b/app/assets/stylesheets/framework/lists.scss index 666195f9546..b70c6def4f2 100644 --- a/app/assets/stylesheets/framework/lists.scss +++ b/app/assets/stylesheets/framework/lists.scss @@ -304,7 +304,6 @@ ul.indent-list { .group-list-tree { margin-bottom: 0; margin-left: 20px; - // border-top: solid 1px $border-white-light; position: relative; &::before { diff --git a/config/webpack.config.js b/config/webpack.config.js index 3b7f1c33c95..d67076ce06b 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -156,6 +156,7 @@ var config = { 'environments', 'environments_folder', 'filtered_search', + 'groups', 'issue_show', 'merge_conflicts', 'notebook_viewer', diff --git a/spec/javascripts/groups/group_item_spec.js b/spec/javascripts/groups/group_item_spec.js index 64b0f31e435..9d70f60cd57 100644 --- a/spec/javascripts/groups/group_item_spec.js +++ b/spec/javascripts/groups/group_item_spec.js @@ -26,6 +26,10 @@ describe('Groups Component', () => { }); }); + afterEach(() => { + component.$destroy(); + }); + it('should render the group item correctly', () => { expect(component.$el.classList.contains('group-row')).toBe(true); expect(component.$el.classList.contains('.no-description')).toBe(false); diff --git a/spec/javascripts/groups/groups_spec.js b/spec/javascripts/groups/groups_spec.js index d1f900df3d8..2a77f7259da 100644 --- a/spec/javascripts/groups/groups_spec.js +++ b/spec/javascripts/groups/groups_spec.js @@ -34,6 +34,10 @@ describe('Groups Component', () => { }); }); + afterEach(() => { + component.$destroy(); + }); + describe('with data', () => { it('should render a list of groups', () => { expect(component.$el.classList.contains('groups-list-tree-container')).toBe(true); diff --git a/spec/javascripts/lib/utils/common_utils_spec.js b/spec/javascripts/lib/utils/common_utils_spec.js index e3938a77680..52cf217c25f 100644 --- a/spec/javascripts/lib/utils/common_utils_spec.js +++ b/spec/javascripts/lib/utils/common_utils_spec.js @@ -150,6 +150,14 @@ import '~/lib/utils/common_utils'; const value = gl.utils.getParameterByName('fakeParameter'); expect(value).toBe(null); }); + + it('should return valid paramentes if URL is provided', () => { + let value = gl.utils.getParameterByName('foo', 'http://cocteau.twins/?foo=bar'); + expect(value).toBe('bar'); + + value = gl.utils.getParameterByName('manan', 'http://cocteau.twins/?foo=bar&manan=canchu'); + expect(value).toBe('canchu'); + }); }); describe('gl.utils.normalizedHeaders', () => { |