Commit 9dd7f161 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett Committed by Phil Hughes

Resolve "Navigating to another group board breaks navigation sidebar"

parent 1c14ced6
......@@ -3,7 +3,7 @@
- issues_sub_menu_items = ['groups#issues', 'labels#index', 'milestones#index']
- if @group.feature_available?(:group_issue_boards)
- issues_sub_menu_items.push('boards#index')
- issues_sub_menu_items.push('boards#index', 'boards#show')
.nav-sidebar{ class: ("sidebar-icons-only" if collapsed_sidebar?) }
.nav-sidebar-inner-scroll
......@@ -64,7 +64,7 @@
List
- if @group.feature_available?(:group_issue_boards)
= nav_link(path: 'boards#index') do
= nav_link(path: ['boards#index', 'boards#show']) do
= link_to group_boards_path(@group), title: 'Boards' do
%span
Boards
......
......@@ -143,6 +143,16 @@ describe 'Multiple Issue Boards', :js do
expect(page).to have_selector('.board', count: 2)
end
it 'maintains sidebar state over board switch' do
assert_boards_nav_active
find('.boards-switcher').click
wait_for_requests
click_link board2.name
assert_boards_nav_active
end
end
context 'unauthorized user' do
......@@ -195,4 +205,8 @@ describe 'Multiple Issue Boards', :js do
expect(page).to have_content('Some of your boards are hidden, activate a license to see them again.')
end
end
def assert_boards_nav_active
expect(find('.nav-sidebar .active .active')).to have_selector('a', text: 'Boards')
end
end
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