Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
83387ca1
Commit
83387ca1
authored
Sep 14, 2020
by
Brandon Labuschagne
Committed by
Martin Wortschack
Sep 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MR Analytics Page not marked as active in the navbar
parent
4d8bc1ac
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
4 deletions
+28
-4
ee/app/helpers/ee/analytics/navbar_helper.rb
ee/app/helpers/ee/analytics/navbar_helper.rb
+3
-3
ee/spec/controllers/groups/analytics/merge_request_analytics_controller_spec.rb
...oups/analytics/merge_request_analytics_controller_spec.rb
+12
-0
ee/spec/controllers/projects/analytics/merge_request_analytics_controller_spec.rb
...ects/analytics/merge_request_analytics_controller_spec.rb
+12
-0
ee/spec/features/groups/navbar_spec.rb
ee/spec/features/groups/navbar_spec.rb
+1
-1
No files found.
ee/app/helpers/ee/analytics/navbar_helper.rb
View file @
83387ca1
...
...
@@ -47,7 +47,7 @@ module EE
navbar_sub_item
(
title:
_
(
'Merge Request'
),
path:
'projects/analytics/merge_request
s
_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 Request
s
'
),
path:
'groups/analytics/merge_request
s
_analytics#show'
,
title:
_
(
'Merge Request'
),
path:
'groups/analytics/merge_request_analytics#show'
,
link:
group_analytics_merge_request_analytics_path
(
group
)
)
end
...
...
ee/spec/controllers/groups/analytics/merge_request_analytics_controller_spec.rb
View file @
83387ca1
...
...
@@ -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
ee/spec/controllers/projects/analytics/merge_request_analytics_controller_spec.rb
View file @
83387ca1
...
...
@@ -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
ee/spec/features/groups/navbar_spec.rb
View file @
83387ca1
...
...
@@ -44,7 +44,7 @@ RSpec.describe 'Group navbar' do
insert_after_sub_nav_item
(
_
(
'Contribution'
),
within:
_
(
'Analytics'
),
new_sub_nav_item_name:
_
(
'Merge Request
s
'
)
new_sub_nav_item_name:
_
(
'Merge Request'
)
)
visit
group_path
(
group
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment