Commit a65f07a2 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Address feedback

parent a7936b2f
/* global Flash */ /* global Flash */
import Vue from 'vue'; import Vue from 'vue';
import GroupsList from '~/groups_list';
import GroupFilterableList from './groups_filterable_list'; import GroupFilterableList from './groups_filterable_list';
import GroupsComponent from './components/groups.vue'; import GroupsComponent from './components/groups.vue';
import GroupFolder from './components/group_folder.vue'; import GroupFolder from './components/group_folder.vue';
...@@ -181,6 +180,6 @@ document.addEventListener('DOMContentLoaded', () => { ...@@ -181,6 +180,6 @@ document.addEventListener('DOMContentLoaded', () => {
eventHub.$off('leaveGroup', this.leaveGroup); eventHub.$off('leaveGroup', this.leaveGroup);
eventHub.$off('updateGroups', this.updateGroups); eventHub.$off('updateGroups', this.updateGroups);
eventHub.$off('updatePagination', this.updatePagination); eventHub.$off('updatePagination', this.updatePagination);
} },
}); });
}); });
...@@ -304,7 +304,6 @@ ul.indent-list { ...@@ -304,7 +304,6 @@ ul.indent-list {
.group-list-tree { .group-list-tree {
margin-bottom: 0; margin-bottom: 0;
margin-left: 20px; margin-left: 20px;
// border-top: solid 1px $border-white-light;
position: relative; position: relative;
&::before { &::before {
......
...@@ -156,6 +156,7 @@ var config = { ...@@ -156,6 +156,7 @@ var config = {
'environments', 'environments',
'environments_folder', 'environments_folder',
'filtered_search', 'filtered_search',
'groups',
'issue_show', 'issue_show',
'merge_conflicts', 'merge_conflicts',
'notebook_viewer', 'notebook_viewer',
......
...@@ -26,6 +26,10 @@ describe('Groups Component', () => { ...@@ -26,6 +26,10 @@ describe('Groups Component', () => {
}); });
}); });
afterEach(() => {
component.$destroy();
});
it('should render the group item correctly', () => { it('should render the group item correctly', () => {
expect(component.$el.classList.contains('group-row')).toBe(true); expect(component.$el.classList.contains('group-row')).toBe(true);
expect(component.$el.classList.contains('.no-description')).toBe(false); expect(component.$el.classList.contains('.no-description')).toBe(false);
......
...@@ -34,6 +34,10 @@ describe('Groups Component', () => { ...@@ -34,6 +34,10 @@ describe('Groups Component', () => {
}); });
}); });
afterEach(() => {
component.$destroy();
});
describe('with data', () => { describe('with data', () => {
it('should render a list of groups', () => { it('should render a list of groups', () => {
expect(component.$el.classList.contains('groups-list-tree-container')).toBe(true); expect(component.$el.classList.contains('groups-list-tree-container')).toBe(true);
......
...@@ -150,6 +150,14 @@ import '~/lib/utils/common_utils'; ...@@ -150,6 +150,14 @@ import '~/lib/utils/common_utils';
const value = gl.utils.getParameterByName('fakeParameter'); const value = gl.utils.getParameterByName('fakeParameter');
expect(value).toBe(null); 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', () => { 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