diff options
-rw-r--r-- | app/helpers/boards_helper.rb | 4 | ||||
-rw-r--r-- | app/views/layouts/nav/sidebar/_project.html.haml | 4 | ||||
-rw-r--r-- | spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb | 24 |
3 files changed, 24 insertions, 8 deletions
diff --git a/app/helpers/boards_helper.rb b/app/helpers/boards_helper.rb index 4bd61aa8f86..62ac208f16a 100644 --- a/app/helpers/boards_helper.rb +++ b/app/helpers/boards_helper.rb @@ -77,4 +77,8 @@ module BoardsHelper 'max-select': dropdown_options[:data][:'max-select'] } end + + def boards_link_text + _("Board") + end end diff --git a/app/views/layouts/nav/sidebar/_project.html.haml b/app/views/layouts/nav/sidebar/_project.html.haml index 9589e81c750..5f7a2d86c0f 100644 --- a/app/views/layouts/nav/sidebar/_project.html.haml +++ b/app/views/layouts/nav/sidebar/_project.html.haml @@ -114,9 +114,9 @@ List = nav_link(controller: :boards) do - = link_to project_boards_path(@project), title: 'Board' do + = link_to project_boards_path(@project), title: boards_link_text do %span - Board + = boards_link_text .feature-highlight.js-feature-highlight{ disabled: true, data: { trigger: 'manual', container: 'body', toggle: 'popover', placement: 'right', highlight: 'issue-boards' } } .feature-highlight-popover-content = render 'feature_highlight/issue_boards.svg' diff --git a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb index b17bc6692f3..c5f455b8948 100644 --- a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb +++ b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb @@ -1,16 +1,28 @@ require 'spec_helper' describe 'layouts/nav/sidebar/_project' do + let(:project) { create(:project, :repository) } + + before do + assign(:project, project) + assign(:repository, project.repository) + allow(view).to receive(:current_ref).and_return('master') + + allow(view).to receive(:can?).and_return(true) + end + + describe 'issue boards' do + it 'has boards tab when multiple issue boards available' do + render + + expect(rendered).to have_css('a[title="Board"]') + end + end + describe 'container registry tab' do before do - project = create(:project, :repository) stub_container_registry_config(enabled: true) - assign(:project, project) - assign(:repository, project.repository) - allow(view).to receive(:current_ref).and_return('master') - - allow(view).to receive(:can?).and_return(true) allow(controller).to receive(:controller_name) .and_return('repositories') allow(controller).to receive(:controller_path) |