Commit 15c33235 authored by Simon Knox's avatar Simon Knox

feature check new sidebar boards link

parent 293aee2b
- issues_sub_menu_items = ['groups#issues', 'labels#index', 'milestones#index']
- if @group.feature_available?(:group_issue_boards)
- issues_sub_menu_items.push('boards#index')
.nav-sidebar{ class: ("sidebar-icons-only" if collapsed_sidebar?) }
.nav-sidebar-inner-scroll
.context-header
......@@ -31,7 +34,7 @@
%span
Contribution Analytics
= nav_link(path: ['groups#issues', 'boards#index', 'labels#index', 'milestones#index']) do
= nav_link(path: issues_sub_menu_items) do
= link_to issues_group_path(@group), title: 'Issues' do
.nav-icon-container
= custom_icon('issues')
......@@ -46,10 +49,11 @@
%span
List
= nav_link(path: 'boards#index') do
= link_to group_boards_path(@group), title: 'Boards' do
%span
Boards
- if @group.feature_available?(:group_issue_boards)
= nav_link(path: 'boards#index') do
= link_to group_boards_path(@group), title: 'Boards' do
%span
Boards
= nav_link(path: 'labels#index') do
= link_to group_labels_path(@group), title: 'Labels' do
......
require 'spec_helper'
describe 'layouts/nav/_new_group_sidebar' do
before do
assign(:group, create(:group))
end
describe 'group issue boards link' do
it 'is not visible when there is no valid license' do
stub_licensed_features(group_issue_boards: false)
render
expect(rendered).not_to have_text 'Boards'
end
it 'is not visible when there is no valid license' do
stub_licensed_features(group_issue_boards: true)
render
expect(rendered).to have_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