diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 09:55:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 09:55:51 +0000 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /spec/support/shared_contexts/navbar_structure_context.rb | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) | |
download | gitlab-ce-e8d2c2579383897a1dd7f9debd359abe8ae8373d.tar.gz |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'spec/support/shared_contexts/navbar_structure_context.rb')
-rw-r--r-- | spec/support/shared_contexts/navbar_structure_context.rb | 165 |
1 files changed, 72 insertions, 93 deletions
diff --git a/spec/support/shared_contexts/navbar_structure_context.rb b/spec/support/shared_contexts/navbar_structure_context.rb index c00b7203af6..b7eb03de8f0 100644 --- a/spec/support/shared_contexts/navbar_structure_context.rb +++ b/spec/support/shared_contexts/navbar_structure_context.rb @@ -1,19 +1,6 @@ # frozen_string_literal: true RSpec.shared_context 'project navbar structure' do - let(:analytics_nav_item) do - { - nav_item: _('Analytics'), - nav_sub_items: [ - _('CI/CD'), - (_('Code Review') if Gitlab.ee?), - (_('Merge Request') if Gitlab.ee?), - _('Repository'), - _('Value Stream') - ] - } - end - let(:security_and_compliance_nav_item) do { nav_item: _('Security & Compliance'), @@ -24,64 +11,20 @@ RSpec.shared_context 'project navbar structure' do } end - let(:monitor_nav_item) do - { - nav_item: _('Operations'), - nav_sub_items: monitor_menu_items - } - end - - let(:monitor_menu_items) do - [ - _('Metrics'), - _('Logs'), - _('Tracing'), - _('Error Tracking'), - _('Alerts'), - _('Incidents'), - _('Serverless'), - _('Terraform'), - _('Kubernetes'), - _('Environments'), - _('Feature Flags'), - _('Product Analytics') - ] - end - - let(:project_information_nav_item) do - { - nav_item: _('Project overview'), - nav_sub_items: [ - _('Details'), - _('Activity'), - _('Releases') - ] - } - end - - let(:settings_menu_items) do - [ - _('General'), - _('Integrations'), - _('Webhooks'), - _('Access Tokens'), - _('Repository'), - _('CI/CD'), - _('Operations') - ] - end - - let(:project_context_nav_item) do - { - nav_item: "#{project.name[0, 1].upcase} #{project.name}", - nav_sub_items: [] - } - end - let(:structure) do [ - project_context_nav_item, - project_information_nav_item, + { + nav_item: "#{project.name[0, 1].upcase} #{project.name}", + nav_sub_items: [] + }, + { + nav_item: _('Project information'), + nav_sub_items: [ + _('Activity'), + _('Labels'), + _('Members') + ] + }, { nav_item: _('Repository'), nav_sub_items: [ @@ -120,8 +63,44 @@ RSpec.shared_context 'project navbar structure' do ] }, security_and_compliance_nav_item, - monitor_nav_item, - analytics_nav_item, + { + nav_item: _('Deployments'), + nav_sub_items: [ + _('Feature Flags'), + _('Environments'), + _('Releases') + ] + }, + { + nav_item: _('Monitor'), + nav_sub_items: [ + _('Metrics'), + _('Logs'), + _('Tracing'), + _('Error Tracking'), + _('Alerts'), + _('Incidents'), + _('Product Analytics') + ] + }, + { + nav_item: _('Infrastructure'), + nav_sub_items: [ + _('Kubernetes clusters'), + _('Serverless platform'), + _('Terraform') + ] + }, + { + nav_item: _('Analytics'), + nav_sub_items: [ + _('CI/CD'), + (_('Code review') if Gitlab.ee?), + (_('Merge request') if Gitlab.ee?), + _('Repository'), + _('Value stream') + ] + }, { nav_item: _('Wiki'), nav_sub_items: [] @@ -132,7 +111,15 @@ RSpec.shared_context 'project navbar structure' do }, { nav_item: _('Settings'), - nav_sub_items: settings_menu_items + nav_sub_items: [ + _('General'), + _('Integrations'), + _('Webhooks'), + _('Access Tokens'), + _('Repository'), + _('CI/CD'), + _('Monitor') + ] } ].compact end @@ -189,17 +176,6 @@ RSpec.shared_context 'group navbar structure' do } end - let(:group_information_nav_item) do - { - nav_item: _('Group information'), - nav_sub_items: [ - _('Activity'), - _('Labels'), - _('Members') - ] - } - end - let(:issues_nav_items) do [ _('List'), @@ -208,17 +184,20 @@ RSpec.shared_context 'group navbar structure' do ] end - let(:group_context_nav_item) do - { - nav_item: "#{group.name[0, 1].upcase} #{group.name}", - nav_sub_items: [] - } - end - let(:structure) do [ - group_context_nav_item, - group_information_nav_item, + { + nav_item: "#{group.name[0, 1].upcase} #{group.name}", + nav_sub_items: [] + }, + { + nav_item: _('Group information'), + nav_sub_items: [ + _('Activity'), + _('Labels'), + _('Members') + ] + }, { nav_item: _('Issues'), nav_sub_items: issues_nav_items @@ -227,7 +206,7 @@ RSpec.shared_context 'group navbar structure' do nav_item: _('Merge requests'), nav_sub_items: [] }, - security_and_compliance_nav_item, + (security_and_compliance_nav_item if Gitlab.ee?), (push_rules_nav_item if Gitlab.ee?), { nav_item: _('Kubernetes'), |