2020-03-19 11:09:41 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
RSpec.shared_context 'project navbar structure' do
|
2022-04-14 05:10:34 -04:00
|
|
|
include NavbarStructureHelper
|
|
|
|
|
2020-12-16 10:10:18 -05:00
|
|
|
let(:security_and_compliance_nav_item) do
|
|
|
|
{
|
|
|
|
nav_item: _('Security & Compliance'),
|
|
|
|
nav_sub_items: [
|
2021-11-30 04:09:53 -05:00
|
|
|
(_('Audit events') if Gitlab.ee?),
|
2021-06-03 05:10:18 -04:00
|
|
|
_('Configuration')
|
2020-12-16 10:10:18 -05:00
|
|
|
]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2020-03-19 11:09:41 -04:00
|
|
|
let(:structure) do
|
|
|
|
[
|
2021-06-22 15:11:50 -04:00
|
|
|
{
|
|
|
|
nav_item: "#{project.name[0, 1].upcase} #{project.name}",
|
|
|
|
nav_sub_items: []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
nav_item: _('Project information'),
|
|
|
|
nav_sub_items: [
|
|
|
|
_('Activity'),
|
|
|
|
_('Labels'),
|
|
|
|
_('Members')
|
|
|
|
]
|
|
|
|
},
|
2020-03-19 11:09:41 -04:00
|
|
|
{
|
|
|
|
nav_item: _('Repository'),
|
|
|
|
nav_sub_items: [
|
|
|
|
_('Files'),
|
|
|
|
_('Commits'),
|
|
|
|
_('Branches'),
|
|
|
|
_('Tags'),
|
|
|
|
_('Contributors'),
|
|
|
|
_('Graph'),
|
|
|
|
_('Compare'),
|
|
|
|
(_('Locked Files') if Gitlab.ee?)
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
nav_item: _('Issues'),
|
|
|
|
nav_sub_items: [
|
|
|
|
_('List'),
|
|
|
|
_('Boards'),
|
2020-07-15 17:09:26 -04:00
|
|
|
_('Service Desk'),
|
2022-04-28 08:09:06 -04:00
|
|
|
_('Milestones')
|
2020-03-19 11:09:41 -04:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2021-04-01 05:09:05 -04:00
|
|
|
nav_item: _('Merge requests'),
|
2020-03-19 11:09:41 -04:00
|
|
|
nav_sub_items: []
|
|
|
|
},
|
|
|
|
{
|
2021-03-10 13:09:32 -05:00
|
|
|
nav_item: _('CI/CD'),
|
2020-03-19 11:09:41 -04:00
|
|
|
nav_sub_items: [
|
|
|
|
_('Pipelines'),
|
2020-10-30 08:08:44 -04:00
|
|
|
s_('Pipelines|Editor'),
|
2020-03-19 11:09:41 -04:00
|
|
|
_('Jobs'),
|
|
|
|
_('Artifacts'),
|
|
|
|
_('Schedules')
|
|
|
|
]
|
|
|
|
},
|
2021-02-04 16:09:06 -05:00
|
|
|
security_and_compliance_nav_item,
|
2021-06-22 15:11:50 -04:00
|
|
|
{
|
|
|
|
nav_item: _('Deployments'),
|
|
|
|
nav_sub_items: [
|
|
|
|
_('Environments'),
|
2022-10-31 05:09:32 -04:00
|
|
|
_('Feature Flags'),
|
2021-06-22 15:11:50 -04:00
|
|
|
_('Releases')
|
|
|
|
]
|
|
|
|
},
|
2022-04-29 05:09:48 -04:00
|
|
|
{
|
|
|
|
nav_item: _('Infrastructure'),
|
|
|
|
nav_sub_items: [
|
|
|
|
_('Kubernetes clusters'),
|
|
|
|
_('Terraform')
|
|
|
|
]
|
|
|
|
},
|
2021-06-22 15:11:50 -04:00
|
|
|
{
|
|
|
|
nav_item: _('Monitor'),
|
|
|
|
nav_sub_items: [
|
|
|
|
_('Metrics'),
|
|
|
|
_('Error Tracking'),
|
|
|
|
_('Alerts'),
|
2022-10-25 11:10:55 -04:00
|
|
|
_('Incidents')
|
2021-06-22 15:11:50 -04:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
nav_item: _('Analytics'),
|
2022-04-20 05:09:31 -04:00
|
|
|
nav_sub_items: project_analytics_sub_nav_item
|
2021-06-22 15:11:50 -04:00
|
|
|
},
|
2020-03-19 11:09:41 -04:00
|
|
|
{
|
|
|
|
nav_item: _('Wiki'),
|
|
|
|
nav_sub_items: []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
nav_item: _('Snippets'),
|
|
|
|
nav_sub_items: []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
nav_item: _('Settings'),
|
2021-06-22 15:11:50 -04:00
|
|
|
nav_sub_items: [
|
|
|
|
_('General'),
|
|
|
|
_('Integrations'),
|
|
|
|
_('Webhooks'),
|
|
|
|
_('Access Tokens'),
|
|
|
|
_('Repository'),
|
2022-09-06 08:10:02 -04:00
|
|
|
_('Merge requests'),
|
2021-06-22 15:11:50 -04:00
|
|
|
_('CI/CD'),
|
2022-09-05 20:12:24 -04:00
|
|
|
_('Packages and registries'),
|
2021-08-23 11:10:43 -04:00
|
|
|
_('Monitor'),
|
2021-10-19 05:09:54 -04:00
|
|
|
s_('UsageQuota|Usage Quotas')
|
2021-06-22 15:11:50 -04:00
|
|
|
]
|
2020-03-19 11:09:41 -04:00
|
|
|
}
|
|
|
|
].compact
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
RSpec.shared_context 'group navbar structure' do
|
|
|
|
let(:analytics_nav_item) do
|
|
|
|
{
|
|
|
|
nav_item: _('Analytics'),
|
2022-04-20 05:09:31 -04:00
|
|
|
nav_sub_items: group_analytics_sub_nav_item
|
2020-03-19 11:09:41 -04:00
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
let(:settings_nav_item) do
|
|
|
|
{
|
|
|
|
nav_item: _('Settings'),
|
|
|
|
nav_sub_items: [
|
|
|
|
_('General'),
|
2020-08-24 23:10:50 -04:00
|
|
|
_('Integrations'),
|
2022-05-31 14:08:16 -04:00
|
|
|
_('Webhooks'),
|
2022-01-17 07:17:11 -05:00
|
|
|
_('Access Tokens'),
|
2020-03-19 11:09:41 -04:00
|
|
|
_('Projects'),
|
2020-04-21 11:21:10 -04:00
|
|
|
_('Repository'),
|
2021-03-10 13:09:32 -05:00
|
|
|
_('CI/CD'),
|
2021-03-16 14:11:53 -04:00
|
|
|
_('Applications'),
|
2022-09-13 17:14:17 -04:00
|
|
|
_('Packages and registries'),
|
|
|
|
_('Domain Verification')
|
2020-04-01 20:08:11 -04:00
|
|
|
]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2022-08-18 05:11:27 -04:00
|
|
|
let(:settings_for_maintainer_nav_item) do
|
|
|
|
{
|
|
|
|
nav_item: _('Settings'),
|
|
|
|
nav_sub_items: [
|
|
|
|
_('Repository')
|
|
|
|
]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2020-04-01 20:08:11 -04:00
|
|
|
let(:administration_nav_item) do
|
|
|
|
{
|
|
|
|
nav_item: _('Administration'),
|
|
|
|
nav_sub_items: [
|
|
|
|
s_('UsageQuota|Usage Quotas')
|
2020-03-19 11:09:41 -04:00
|
|
|
]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2020-12-16 10:10:18 -05:00
|
|
|
let(:security_and_compliance_nav_item) do
|
|
|
|
{
|
|
|
|
nav_item: _('Security & Compliance'),
|
|
|
|
nav_sub_items: [
|
2021-11-30 04:09:53 -05:00
|
|
|
_('Audit events')
|
2020-12-16 10:10:18 -05:00
|
|
|
]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2021-07-26 17:08:38 -04:00
|
|
|
let(:ci_cd_nav_item) do
|
|
|
|
{
|
|
|
|
nav_item: _('CI/CD'),
|
|
|
|
nav_sub_items: [
|
|
|
|
s_('Runners|Runners')
|
|
|
|
]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2021-05-18 11:10:46 -04:00
|
|
|
let(:issues_nav_items) do
|
|
|
|
[
|
|
|
|
_('List'),
|
|
|
|
_('Board'),
|
2021-11-26 07:12:49 -05:00
|
|
|
_('Milestones'),
|
|
|
|
(_('Iterations') if Gitlab.ee?)
|
2021-05-18 11:10:46 -04:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
2020-03-19 11:09:41 -04:00
|
|
|
let(:structure) do
|
|
|
|
[
|
2021-06-22 15:11:50 -04:00
|
|
|
{
|
|
|
|
nav_item: "#{group.name[0, 1].upcase} #{group.name}",
|
|
|
|
nav_sub_items: []
|
|
|
|
},
|
|
|
|
{
|
2022-03-14 08:07:59 -04:00
|
|
|
nav_item: group.root? ? _('Group information') : _('Subgroup information'),
|
2021-06-22 15:11:50 -04:00
|
|
|
nav_sub_items: [
|
|
|
|
_('Activity'),
|
|
|
|
_('Labels'),
|
|
|
|
_('Members')
|
|
|
|
]
|
|
|
|
},
|
2020-03-19 11:09:41 -04:00
|
|
|
{
|
|
|
|
nav_item: _('Issues'),
|
2021-05-18 11:10:46 -04:00
|
|
|
nav_sub_items: issues_nav_items
|
2020-03-19 11:09:41 -04:00
|
|
|
},
|
|
|
|
{
|
2021-04-01 05:09:05 -04:00
|
|
|
nav_item: _('Merge requests'),
|
2020-03-19 11:09:41 -04:00
|
|
|
nav_sub_items: []
|
|
|
|
},
|
2021-06-22 15:11:50 -04:00
|
|
|
(security_and_compliance_nav_item if Gitlab.ee?),
|
2020-03-19 11:09:41 -04:00
|
|
|
{
|
|
|
|
nav_item: _('Kubernetes'),
|
|
|
|
nav_sub_items: []
|
|
|
|
},
|
2021-05-18 11:10:46 -04:00
|
|
|
(analytics_nav_item if Gitlab.ee?)
|
2020-03-19 11:09:41 -04:00
|
|
|
]
|
|
|
|
end
|
|
|
|
end
|