2020-03-19 11:09:41 -04:00
|
|
|
# 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?),
|
2020-07-30 14:09:39 -04:00
|
|
|
(_('Merge Request') if Gitlab.ee?),
|
2020-03-19 11:09:41 -04:00
|
|
|
_('Repository'),
|
|
|
|
_('Value Stream')
|
|
|
|
]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
let(:structure) do
|
|
|
|
[
|
|
|
|
{
|
|
|
|
nav_item: _('Project overview'),
|
|
|
|
nav_sub_items: [
|
|
|
|
_('Details'),
|
|
|
|
_('Activity'),
|
|
|
|
_('Releases')
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
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'),
|
|
|
|
_('Labels'),
|
2020-07-15 17:09:26 -04:00
|
|
|
_('Service Desk'),
|
2020-03-19 11:09:41 -04:00
|
|
|
_('Milestones')
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
nav_item: _('Merge Requests'),
|
|
|
|
nav_sub_items: []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
nav_item: _('CI / CD'),
|
|
|
|
nav_sub_items: [
|
|
|
|
_('Pipelines'),
|
|
|
|
_('Jobs'),
|
|
|
|
_('Artifacts'),
|
|
|
|
_('Schedules')
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
nav_item: _('Operations'),
|
|
|
|
nav_sub_items: [
|
|
|
|
_('Metrics'),
|
2020-10-08 05:08:40 -04:00
|
|
|
_('Logs'),
|
2020-10-08 20:08:41 -04:00
|
|
|
_('Tracing'),
|
2020-10-08 05:08:40 -04:00
|
|
|
_('Error Tracking'),
|
2020-04-21 11:21:10 -04:00
|
|
|
_('Alerts'),
|
2020-07-23 05:09:18 -04:00
|
|
|
_('Incidents'),
|
2020-03-19 11:09:41 -04:00
|
|
|
_('Serverless'),
|
2020-10-08 05:08:40 -04:00
|
|
|
_('Kubernetes'),
|
|
|
|
_('Environments'),
|
2020-10-13 11:08:53 -04:00
|
|
|
_('Feature Flags'),
|
2020-10-08 05:08:40 -04:00
|
|
|
_('Product Analytics')
|
2020-03-19 11:09:41 -04:00
|
|
|
]
|
|
|
|
},
|
|
|
|
analytics_nav_item,
|
|
|
|
{
|
|
|
|
nav_item: _('Wiki'),
|
|
|
|
nav_sub_items: []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
nav_item: _('Snippets'),
|
|
|
|
nav_sub_items: []
|
|
|
|
},
|
2020-05-28 11:08:02 -04:00
|
|
|
{
|
|
|
|
nav_item: _('Members'),
|
|
|
|
nav_sub_items: []
|
|
|
|
},
|
2020-03-19 11:09:41 -04:00
|
|
|
{
|
|
|
|
nav_item: _('Settings'),
|
|
|
|
nav_sub_items: [
|
|
|
|
_('General'),
|
|
|
|
_('Integrations'),
|
|
|
|
_('Webhooks'),
|
2020-05-15 05:07:59 -04:00
|
|
|
_('Access Tokens'),
|
2020-03-19 11:09:41 -04:00
|
|
|
_('Repository'),
|
|
|
|
_('CI / CD'),
|
|
|
|
_('Operations'),
|
|
|
|
(_('Audit Events') if Gitlab.ee?)
|
|
|
|
].compact
|
|
|
|
}
|
|
|
|
].compact
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
RSpec.shared_context 'group navbar structure' do
|
|
|
|
let(:analytics_nav_item) do
|
|
|
|
{
|
|
|
|
nav_item: _('Analytics'),
|
|
|
|
nav_sub_items: [
|
|
|
|
_('Contribution')
|
|
|
|
]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
let(:settings_nav_item) do
|
|
|
|
{
|
|
|
|
nav_item: _('Settings'),
|
|
|
|
nav_sub_items: [
|
|
|
|
_('General'),
|
2020-08-24 23:10:50 -04:00
|
|
|
_('Integrations'),
|
2020-03-19 11:09:41 -04:00
|
|
|
_('Projects'),
|
2020-04-21 11:21:10 -04:00
|
|
|
_('Repository'),
|
2020-03-19 11:09:41 -04:00
|
|
|
_('CI / CD'),
|
|
|
|
_('Webhooks'),
|
2020-04-01 20:08:11 -04:00
|
|
|
_('Audit Events')
|
|
|
|
]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
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-09-04 08:08:27 -04:00
|
|
|
let(:push_rules_nav_item) do
|
|
|
|
{
|
|
|
|
nav_item: _('Push Rules'),
|
|
|
|
nav_sub_items: []
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2020-03-19 11:09:41 -04:00
|
|
|
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: []
|
|
|
|
},
|
2020-09-04 08:08:27 -04:00
|
|
|
(push_rules_nav_item if Gitlab.ee?),
|
2020-03-19 11:09:41 -04:00
|
|
|
{
|
|
|
|
nav_item: _('Kubernetes'),
|
|
|
|
nav_sub_items: []
|
|
|
|
},
|
|
|
|
(analytics_nav_item if Gitlab.ee?),
|
|
|
|
{
|
|
|
|
nav_item: _('Members'),
|
|
|
|
nav_sub_items: []
|
|
|
|
}
|
|
|
|
]
|
|
|
|
end
|
|
|
|
end
|