diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-06 12:10:29 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-06 12:10:29 +0000 |
commit | 5564275a0b378298dc6281599cbfe71a937109ff (patch) | |
tree | a468e1e60046356410219c35c23a8a428c5e2c5e /spec/features/groups | |
parent | d87918510a866a5fcbbc2f899ad65c6938ebf5f5 (diff) | |
download | gitlab-ce-5564275a0b378298dc6281599cbfe71a937109ff.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/groups')
-rw-r--r-- | spec/features/groups/navbar_spec.rb | 99 |
1 files changed, 58 insertions, 41 deletions
diff --git a/spec/features/groups/navbar_spec.rb b/spec/features/groups/navbar_spec.rb index 5662465d431..8c16dcec42f 100644 --- a/spec/features/groups/navbar_spec.rb +++ b/spec/features/groups/navbar_spec.rb @@ -3,53 +3,53 @@ require 'spec_helper' describe 'Group navbar' do - it_behaves_like 'verified navigation bar' do - let(:user) { create(:user) } - let(:group) { create(:group) } + let(:user) { create(:user) } + let(:group) { create(:group) } + + let(:analytics_nav_item) do + { + nav_item: _('Analytics'), + nav_sub_items: [ + _('Contribution Analytics') + ] + } + end - let(:analytics_nav_item) do + let(:structure) do + [ + { + nav_item: _('Group overview'), + nav_sub_items: [ + _('Details'), + _('Activity') + ] + }, { - nav_item: _('Analytics'), + nav_item: _('Issues'), nav_sub_items: [ - _('Contribution Analytics') + _('List'), + _('Board'), + _('Labels'), + _('Milestones') ] + }, + { + nav_item: _('Merge Requests'), + nav_sub_items: [] + }, + { + nav_item: _('Kubernetes'), + nav_sub_items: [] + }, + (analytics_nav_item if Gitlab.ee?), + { + nav_item: _('Members'), + nav_sub_items: [] } - end - - let(:structure) do - [ - { - nav_item: _('Group overview'), - nav_sub_items: [ - _('Details'), - _('Activity') - ] - }, - { - nav_item: _('Issues'), - nav_sub_items: [ - _('List'), - _('Board'), - _('Labels'), - _('Milestones') - ] - }, - { - nav_item: _('Merge Requests'), - nav_sub_items: [] - }, - { - nav_item: _('Kubernetes'), - nav_sub_items: [] - }, - (analytics_nav_item if Gitlab.ee?), - { - nav_item: _('Members'), - nav_sub_items: [] - } - ] - end + ] + end + it_behaves_like 'verified navigation bar' do before do group.add_maintainer(user) sign_in(user) @@ -57,4 +57,21 @@ describe 'Group navbar' do visit group_path(group) end end + + if Gitlab.ee? + context 'when productivity analytics is available' do + before do + stub_licensed_features(productivity_analytics: true) + + analytics_nav_item[:nav_sub_items] << _('Productivity Analytics') + + group.add_maintainer(user) + sign_in(user) + + visit group_path(group) + end + + it_behaves_like 'verified navigation bar' + end + end end |