diff options
-rw-r--r-- | app/helpers/breadcrumbs_helper.rb | 6 | ||||
-rw-r--r-- | app/views/layouts/nav/_breadcrumbs.html.haml | 2 | ||||
-rw-r--r-- | changelogs/unreleased/breadcrumb-item-links.yml | 5 | ||||
-rw-r--r-- | features/steps/project/wiki.rb | 4 | ||||
-rw-r--r-- | spec/features/issues_spec.rb | 8 |
5 files changed, 17 insertions, 8 deletions
diff --git a/app/helpers/breadcrumbs_helper.rb b/app/helpers/breadcrumbs_helper.rb index ee1b7ed083e..87d2a47f6cb 100644 --- a/app/helpers/breadcrumbs_helper.rb +++ b/app/helpers/breadcrumbs_helper.rb @@ -10,11 +10,7 @@ module BreadcrumbsHelper def breadcrumb_title_link return @breadcrumb_link if @breadcrumb_link - if controller.available_action?(:index) - url_for(action: "index") - else - request.path - end + request.path end def breadcrumb_title(title) diff --git a/app/views/layouts/nav/_breadcrumbs.html.haml b/app/views/layouts/nav/_breadcrumbs.html.haml index 7bd3f5306a2..002922e13f1 100644 --- a/app/views/layouts/nav/_breadcrumbs.html.haml +++ b/app/views/layouts/nav/_breadcrumbs.html.haml @@ -16,5 +16,5 @@ = breadcrumb_list_item link_to(extra[:text], extra[:link]) = render "layouts/nav/breadcrumbs/collapsed_dropdown", location: :after %li - %h2.breadcrumbs-sub-title= @breadcrumb_title + %h2.breadcrumbs-sub-title= link_to @breadcrumb_title, breadcrumb_title_link = yield :header_content diff --git a/changelogs/unreleased/breadcrumb-item-links.yml b/changelogs/unreleased/breadcrumb-item-links.yml new file mode 100644 index 00000000000..9b66456efca --- /dev/null +++ b/changelogs/unreleased/breadcrumb-item-links.yml @@ -0,0 +1,5 @@ +--- +title: Fixed issue/merge request breadcrumb titles not having links +merge_request: +author: +type: fixed diff --git a/features/steps/project/wiki.rb b/features/steps/project/wiki.rb index 855757e34b3..4738dd8751b 100644 --- a/features/steps/project/wiki.rb +++ b/features/steps/project/wiki.rb @@ -147,7 +147,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps step 'I edit the Wiki page with a path' do expect(find('.wiki-pages')).to have_content('Three') - click_on 'Three' + first(:link, text: 'Three').trigger('click') expect(find('.nav-text')).to have_content('Three') click_on 'Edit' end @@ -161,7 +161,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps end step 'I view the page history of a Wiki page that has a path' do - click_on 'Three' + first(:link, text: 'Three').trigger('click') click_on 'Page history' end diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index 5c284a1fe5f..b08cd7ea9fd 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -131,6 +131,14 @@ describe 'Issues' do end describe 'Issue info' do + it 'links to current issue in breadcrubs' do + issue = create(:issue, project: project) + + visit project_issue_path(project, issue) + + expect(find('.breadcrumbs-sub-title a')[:href]).to end_with(issue_path(issue)) + end + it 'excludes award_emoji from comment count' do issue = create(:issue, author: user, assignees: [user], project: project, title: 'foobar') create(:award_emoji, awardable: issue) |