diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2017-06-08 07:00:03 +0300 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2017-06-08 07:00:03 +0300 |
commit | 7ff17980ce58fc7b9e6ba5ee95cb34f52e871b18 (patch) | |
tree | cfafcb8e04dcb24f5f0756f3d43fc95854a76f16 /spec/javascripts/groups | |
parent | ff05275797bf56e49db238ff57e28b988663eb3e (diff) |
Display user access type for each group
Also adds unit tests for this
Diffstat (limited to 'spec/javascripts/groups')
-rw-r--r-- | spec/javascripts/groups/group_item_spec.js | 1 | ||||
-rw-r--r-- | spec/javascripts/groups/mock_data.js | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/spec/javascripts/groups/group_item_spec.js b/spec/javascripts/groups/group_item_spec.js index 9d70f60cd57..73ea86e6756 100644 --- a/spec/javascripts/groups/group_item_spec.js +++ b/spec/javascripts/groups/group_item_spec.js @@ -38,6 +38,7 @@ describe('Groups Component', () => { expect(component.$el.querySelector('.group-visibility')).toBeDefined(); expect(component.$el.querySelector('.avatar-container')).toBeDefined(); expect(component.$el.querySelector('.title').textContent).toContain(group.name); + expect(component.$el.querySelector('.access-type').textContent).toContain(group.permissions.humanGroupAccess); expect(component.$el.querySelector('.description').textContent).toContain(group.description); expect(component.$el.querySelector('.edit-group')).toBeDefined(); expect(component.$el.querySelector('.leave-group')).toBeDefined(); diff --git a/spec/javascripts/groups/mock_data.js b/spec/javascripts/groups/mock_data.js index 9951abcc2dc..1c0ec7a97d0 100644 --- a/spec/javascripts/groups/mock_data.js +++ b/spec/javascripts/groups/mock_data.js @@ -15,7 +15,7 @@ const group1 = { number_users_with_delimiter: '1', has_subgroups: true, permissions: { - group_access: 50, + human_group_access: 'Master', }, }; @@ -37,7 +37,7 @@ const group14 = { number_users_with_delimiter: '1', has_subgroups: true, permissions: { - group_access: 30, + human_group_access: 'Master', }, }; @@ -58,7 +58,7 @@ const group2 = { number_users_with_delimiter: '1', has_subgroups: true, permissions: { - group_access: 50, + human_group_access: 'Master', }, }; @@ -79,7 +79,7 @@ const group21 = { number_users_with_delimiter: '1', has_subgroups: true, permissions: { - group_access: 50, + human_group_access: 'Master', }, }; |