Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2017-05-30 12:26:46 +0300
committerAlfredo Sumaran <alfredo@gitlab.com>2017-05-30 12:29:54 +0300
commit41203686c3964774bae878be91dc92fa86d8b725 (patch)
tree0b36ab0f9078027c2b4f99244ffc485d55150ce7 /spec/javascripts/groups
parent0b594f68271973ebc4c0464c3bac8e7cdad66ba8 (diff)
Fix tests and eslint errors
[ci skip]
Diffstat (limited to 'spec/javascripts/groups')
-rw-r--r--spec/javascripts/groups/group_item_spec.js2
-rw-r--r--spec/javascripts/groups/groups_spec.js2
-rw-r--r--spec/javascripts/groups/mock_data.js12
3 files changed, 14 insertions, 2 deletions
diff --git a/spec/javascripts/groups/group_item_spec.js b/spec/javascripts/groups/group_item_spec.js
index 08e22728aba..ed441242085 100644
--- a/spec/javascripts/groups/group_item_spec.js
+++ b/spec/javascripts/groups/group_item_spec.js
@@ -26,7 +26,7 @@ describe('Groups Component', () => {
it('should render the group item', () => {
expect(component.$el.classList.contains('group-row')).toBe(true);
expect(component.$el.querySelector('.number-projects').textContent).toContain(group.numberProjects);
- expect(component.$el.querySelector('.number-members').textContent).toContain(group.numberMembers);
+ expect(component.$el.querySelector('.number-users').textContent).toContain(group.numberUsers);
expect(component.$el.querySelector('.group-visibility')).toBeDefined();
expect(component.$el.querySelector('.avatar-container')).toBeDefined();
expect(component.$el.querySelector('.title').textContent).toContain(group.name);
diff --git a/spec/javascripts/groups/groups_spec.js b/spec/javascripts/groups/groups_spec.js
index 47ca90551c7..d1f900df3d8 100644
--- a/spec/javascripts/groups/groups_spec.js
+++ b/spec/javascripts/groups/groups_spec.js
@@ -48,7 +48,7 @@ describe('Groups Component', () => {
expect(lists.length).toBe(3); // one parent and two subgroups
expect(lists[0].querySelector('#group-1119').classList.contains('is-open')).toBe(true);
- expect(lists[0].querySelector('#group-1119').classList.contains('is-expandable')).toBe(true);
+ expect(lists[0].querySelector('#group-1119').classList.contains('has-subgroups')).toBe(true);
expect(lists[2].querySelector('#group-1120').textContent).toContain(groups[1119].subGroups[1120].name);
});
diff --git a/spec/javascripts/groups/mock_data.js b/spec/javascripts/groups/mock_data.js
index 7d6910137fe..fdb809018cf 100644
--- a/spec/javascripts/groups/mock_data.js
+++ b/spec/javascripts/groups/mock_data.js
@@ -11,6 +11,9 @@ const group1 = {
parent_id: null,
created_at: '2017-05-15T19:01:23.670Z',
updated_at: '2017-05-15T19:01:23.670Z',
+ number_projects: '1',
+ number_users: '1',
+ has_subgroups: true,
permissions: {
group_access: 50,
},
@@ -30,6 +33,9 @@ const group14 = {
parent_id: 1127,
created_at: '2017-05-15T19:02:01.645Z',
updated_at: '2017-05-15T19:02:01.645Z',
+ number_projects: '1',
+ number_users: '1',
+ has_subgroups: true,
permissions: {
group_access: 30,
},
@@ -48,6 +54,9 @@ const group2 = {
parent_id: null,
created_at: '2017-05-11T19:35:09.635Z',
updated_at: '2017-05-11T19:35:09.635Z',
+ number_projects: '1',
+ number_users: '1',
+ has_subgroups: true,
permissions: {
group_access: 50,
},
@@ -66,6 +75,9 @@ const group21 = {
parent_id: 1119,
created_at: '2017-05-11T19:51:04.060Z',
updated_at: '2017-05-11T19:51:04.060Z',
+ number_projects: '1',
+ number_users: '1',
+ has_subgroups: true,
permissions: {
group_access: 50,
},