diff options
Diffstat (limited to 'spec/features/groups/navbar_spec.rb')
-rw-r--r-- | spec/features/groups/navbar_spec.rb | 62 |
1 files changed, 44 insertions, 18 deletions
diff --git a/spec/features/groups/navbar_spec.rb b/spec/features/groups/navbar_spec.rb index 021b1af54d4..b46d4dae87a 100644 --- a/spec/features/groups/navbar_spec.rb +++ b/spec/features/groups/navbar_spec.rb @@ -13,21 +13,10 @@ RSpec.describe 'Group navbar' do let(:structure) do [ - { - nav_item: _('Group overview'), - nav_sub_items: [ - _('Details'), - _('Activity') - ] - }, + group_information_nav_item, { nav_item: _('Issues'), - nav_sub_items: [ - _('List'), - _('Board'), - _('Labels'), - _('Milestones') - ] + nav_sub_items: issues_nav_items }, { nav_item: _('Merge requests'), @@ -40,11 +29,12 @@ RSpec.describe 'Group navbar' do nav_sub_items: [] }, (analytics_nav_item if Gitlab.ee?), - { - nav_item: _('Members'), - nav_sub_items: [] - } - ] + members_nav_item + ].compact + end + + let(:members_nav_item) do + nil end before do @@ -87,4 +77,40 @@ RSpec.describe 'Group navbar' do it_behaves_like 'verified navigation bar' end + + context 'when feature flag :sidebar_refactor is disabled' do + let(:group_information_nav_item) do + { + nav_item: _('Group overview'), + nav_sub_items: [ + _('Details'), + _('Activity') + ] + } + end + + let(:members_nav_item) do + { + nav_item: _('Members'), + nav_sub_items: [] + } + end + + let(:issues_nav_items) do + [ + _('List'), + _('Board'), + _('Labels'), + _('Milestones') + ] + end + + before do + stub_feature_flags(sidebar_refactor: false) + + visit group_path(group) + end + + it_behaves_like 'verified navigation bar' + end end |