Commit dda69dbc authored by Phil Hughes's avatar Phil Hughes

Merge branch '3397-navigating-to-another-group-board-breaks-navigation-sidebar' into 'master'

Resolve "Navigating to another group board breaks navigation sidebar"

Closes #3397

See merge request gitlab-org/gitlab-ee!3010
parents 1c14ced6 9dd7f161
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- issues_sub_menu_items = ['groups#issues', 'labels#index', 'milestones#index'] - issues_sub_menu_items = ['groups#issues', 'labels#index', 'milestones#index']
- if @group.feature_available?(:group_issue_boards) - 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{ class: ("sidebar-icons-only" if collapsed_sidebar?) }
.nav-sidebar-inner-scroll .nav-sidebar-inner-scroll
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
List List
- if @group.feature_available?(:group_issue_boards) - 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 = link_to group_boards_path(@group), title: 'Boards' do
%span %span
Boards Boards
......
...@@ -143,6 +143,16 @@ describe 'Multiple Issue Boards', :js do ...@@ -143,6 +143,16 @@ describe 'Multiple Issue Boards', :js do
expect(page).to have_selector('.board', count: 2) expect(page).to have_selector('.board', count: 2)
end 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 end
context 'unauthorized user' do context 'unauthorized user' do
...@@ -195,4 +205,8 @@ describe 'Multiple Issue Boards', :js 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.') expect(page).to have_content('Some of your boards are hidden, activate a license to see them again.')
end end
end end
def assert_boards_nav_active
expect(find('.nav-sidebar .active .active')).to have_selector('a', text: 'Boards')
end
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