diff options
author | J.D. Bean <jonathandbean@gmail.com> | 2018-09-04 16:48:57 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-09-04 16:48:57 +0000 |
commit | 4cdaecaea08acf803cfb6a01af7699474682224f (patch) | |
tree | 1941e77dff5c46b38bb2c8be3ff699fcefeee264 | |
parent | d73541d006ce3d0261cf082dac5ae605dfe7a848 (diff) | |
download | gitlab-ce-4cdaecaea08acf803cfb6a01af7699474682224f.tar.gz |
fixes breadcrumbs on new issue page. adds link to issues page.
3 files changed, 25 insertions, 1 deletions
diff --git a/app/views/projects/issues/new.html.haml b/app/views/projects/issues/new.html.haml index 60fe442014f..9a081a42b6f 100644 --- a/app/views/projects/issues/new.html.haml +++ b/app/views/projects/issues/new.html.haml @@ -1,4 +1,5 @@ -- breadcrumb_title "Issues" +- add_to_breadcrumbs "Issues", project_issues_path(@project) +- breadcrumb_title "New" - page_title "New Issue" %h3.page-title diff --git a/changelogs/unreleased/21305-breadcrumb-link-to-issues-on-new-issue-page.yml b/changelogs/unreleased/21305-breadcrumb-link-to-issues-on-new-issue-page.yml new file mode 100644 index 00000000000..8e8c3cf53b4 --- /dev/null +++ b/changelogs/unreleased/21305-breadcrumb-link-to-issues-on-new-issue-page.yml @@ -0,0 +1,5 @@ +--- +title: "Fix breadcrumb link to issues on new issue page" +merge_request: 21305 +author: J.D. Bean +type: fixed diff --git a/spec/features/issues/user_sees_breadcrumb_links_spec.rb b/spec/features/issues/user_sees_breadcrumb_links_spec.rb new file mode 100644 index 00000000000..ca234321235 --- /dev/null +++ b/spec/features/issues/user_sees_breadcrumb_links_spec.rb @@ -0,0 +1,18 @@ +require 'rails_helper' + +describe 'New issue breadcrumbs' do + let(:project) { create(:project) } + let(:user) { project.creator } + + before do + sign_in(user) + visit new_project_issue_path(project) + end + + it 'display a link to project issues and new issue pages' do + page.within '.breadcrumbs' do + expect(find_link('Issues')[:href]).to end_with(project_issues_path(project)) + expect(find_link('New')[:href]).to end_with(new_project_issue_path(project)) + end + end +end |