Commit 83387ca1 authored by Brandon Labuschagne's avatar Brandon Labuschagne Committed by Martin Wortschack

MR Analytics Page not marked as active in the navbar

parent 4d8bc1ac
......@@ -47,7 +47,7 @@ module EE
navbar_sub_item(
title: _('Merge Request'),
path: 'projects/analytics/merge_requests_analytics#show',
path: 'projects/analytics/merge_request_analytics#show',
link: project_analytics_merge_request_analytics_path(project)
)
end
......@@ -57,8 +57,8 @@ module EE
return unless group_sidebar_link?(:merge_request_analytics)
navbar_sub_item(
title: _('Merge Requests'),
path: 'groups/analytics/merge_requests_analytics#show',
title: _('Merge Request'),
path: 'groups/analytics/merge_request_analytics#show',
link: group_analytics_merge_request_analytics_path(group)
)
end
......
......@@ -52,5 +52,17 @@ RSpec.describe Groups::Analytics::MergeRequestAnalyticsController do
it { is_expected.to have_gitlab_http_status(:forbidden) }
end
context 'when requesting HTML' do
render_views
before do
get :show, params: { group_id: group }, format: :html
end
it 'renders the side navigation with the correct submenu set as active' do
expect(response.body).to have_active_sub_navigation('Merge Request')
end
end
end
end
......@@ -53,5 +53,17 @@ RSpec.describe Projects::Analytics::MergeRequestAnalyticsController do
it { is_expected.to have_gitlab_http_status(:not_found) }
end
context 'when requesting HTML' do
render_views
before do
get :show, params: { namespace_id: group, project_id: project }, format: :html
end
it 'renders the side navigation with the correct submenu set as active' do
expect(response.body).to have_active_sub_navigation('Merge Request')
end
end
end
end
......@@ -44,7 +44,7 @@ RSpec.describe 'Group navbar' do
insert_after_sub_nav_item(
_('Contribution'),
within: _('Analytics'),
new_sub_nav_item_name: _('Merge Requests')
new_sub_nav_item_name: _('Merge Request')
)
visit group_path(group)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment