Commit a65f07a2 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Address feedback

parent a7936b2f
/* 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);
}
},
});
});
......@@ -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 {
......
......@@ -156,6 +156,7 @@ var config = {
'environments',
'environments_folder',
'filtered_search',
'groups',
'issue_show',
'merge_conflicts',
'notebook_viewer',
......
......@@ -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);
......
......@@ -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);
......
......@@ -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', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment