Commit d694da34 authored by Martin Wortschack's avatar Martin Wortschack

Merge branch '210317-rearrange-group-level-analytics-sidebar-menu' into 'master'

Make "Value Stream" the top item in group-level analytics sidebar menu

Closes #210317

See merge request gitlab-org/gitlab!27277
parents b31f25ec 6a0a5482
- navbar_links = links.sort_by(&:title)
- all_paths = navbar_links.map(&:path)
- analytics_link = navbar_links.find { |link| link.title == _('Value Stream') } || navbar_links.first
- if navbar_links.any?
= nav_link(path: all_paths) do
= link_to navbar_links.first.link do
= link_to analytics_link.link, { data: { qa_selector: 'analytics_anchor' } } do
.nav-icon-container
= sprite_icon('chart')
%span.nav-item-name{ data: { qa_selector: 'analytics_link' } }
= _('Analytics')
%ul.sidebar-sub-level-items{ data: { qa_selector: 'analytics_sidebar_submenu' } }
= nav_link(path: navbar_links.first.path, html_options: { class: "fly-out-top-item" } ) do
= link_to navbar_links.first.link do
= nav_link(path: analytics_link.path, html_options: { class: "fly-out-top-item" } ) do
= link_to analytics_link.link do
%strong.fly-out-top-item-name
= _('Analytics')
%li.divider.fly-out-top-item
......
---
title: Make "Value Stream" the default page that appears when clicking the group-level "Analytics" sidebar item.
merge_request: 27277
author: Gilang Gumilar
type: changed
......@@ -4,6 +4,7 @@ require 'spec_helper'
describe 'Group navbar' do
include NavbarStructureHelper
include WaitForRequests
include_context 'group navbar structure'
......@@ -45,6 +46,16 @@ describe 'Group navbar' do
end
it_behaves_like 'verified navigation bar'
it 'redirects to value stream when Analytics item is clicked' do
page.within('.sidebar-top-level-items') do
find('[data-qa-selector=analytics_anchor]').click
end
wait_for_requests
expect(page).to have_current_path(group_analytics_cycle_analytics_path(group))
end
end
context 'when epics are available' do
......
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