diff --git a/changelogs/unreleased/dz-scope-issue-route-default.yml b/changelogs/unreleased/dz-scope-issue-route-default.yml new file mode 100644 index 0000000000000000000000000000000000000000..d39c70ef620419138cc6307bc2e6fde499f1552c --- /dev/null +++ b/changelogs/unreleased/dz-scope-issue-route-default.yml @@ -0,0 +1,5 @@ +--- +title: Move issues routes under /-/ scope +merge_request: 24791 +author: +type: changed diff --git a/config/routes/project.rb b/config/routes/project.rb index cff075b260f8ce647746d162d49dda8efff36e56..72dda11435c625e40a045ec595a9ff4298980e90 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -279,6 +279,7 @@ end end + draw :issues draw :merge_requests # The wiki and repository routing contains wildcard characters so @@ -401,12 +402,7 @@ # Unscoped route. It will be replaced with redirect to /-/issues/ # Issue https://gitlab.com/gitlab-org/gitlab/issues/118849 - draw :issues - - # To ensure an old unscoped routing is used for the UI we need to - # add prefix 'as' to the scope routing and place it below original routing. - # Issue https://gitlab.com/gitlab-org/gitlab/issues/118849 - scope '-', as: 'scoped' do + scope as: 'deprecated' do draw :issues end diff --git a/ee/app/views/projects/issues/_discussion.html.haml b/ee/app/views/projects/issues/_discussion.html.haml index f53cfe087e92fcc9a8e3a124bdd4dd152a873063..db26dbce90793a035e4ea1f7ebef36bbeaeafd66 100644 --- a/ee/app/views/projects/issues/_discussion.html.haml +++ b/ee/app/views/projects/issues/_discussion.html.haml @@ -12,7 +12,8 @@ = render_ce 'projects/issues/discussion' #designs-tab.tab-pane{ role: 'tabpanel', 'aria-labelledby': 'designs', data: { qa_selector: 'designs_tab_content'} } - if @project.design_management_enabled? - #js-design-management{ data: { project_path: @project.full_path, issue_iid: @issue.iid, issue_path: project_issue_path(@project, @issue) } } + - deprecated_route = current_page?(project_deprecated_issue_path(@project, @issue)) || current_page?(designs_project_deprecated_issue_path(@project, @issue)) + #js-design-management{ data: { project_path: @project.full_path, issue_iid: @issue.iid, issue_path: deprecated_route ? project_deprecated_issue_path(@project, @issue) : project_issue_path(@project, @issue) } } - else .mt-4 .row.empty-state @@ -26,4 +27,3 @@ - support_link_start = ''.html_safe % { url: EE::CUSTOMER_SUPPORT_URL } - link_end = ''.html_safe = s_("DesignManagement|To enable design management, you'll need to %{requirements_link_start}meet the requirements%{requirements_link_end}. If you need help, reach out to our %{support_link_start}support team%{support_link_end} for assistance.").html_safe % { requirements_link_start: requirements_link_start, requirements_link_end: link_end, support_link_start: support_link_start, support_link_end: link_end } - diff --git a/ee/spec/services/epic_issues/list_service_spec.rb b/ee/spec/services/epic_issues/list_service_spec.rb index c579c96399266f72d493dd21524eecf3802a7ce5..b82d0e3e2f7ba31f7215d0dae0e21537b9c65059 100644 --- a/ee/spec/services/epic_issues/list_service_spec.rb +++ b/ee/spec/services/epic_issues/list_service_spec.rb @@ -81,7 +81,7 @@ weight: nil, confidential: false, reference: issue2.to_reference(full: true), - path: "/#{project.full_path}/issues/#{issue2.iid}", + path: "/#{project.full_path}/-/issues/#{issue2.iid}", relation_path: "/groups/#{group.full_path}/-/epics/#{epic.iid}/issues/#{epic_issue2.id}", epic_issue_id: epic_issue2.id, due_date: nil, @@ -97,7 +97,7 @@ weight: 1, confidential: false, reference: issue1.to_reference(full: true), - path: "/#{project.full_path}/issues/#{issue1.iid}", + path: "/#{project.full_path}/-/issues/#{issue1.iid}", relation_path: "/groups/#{group.full_path}/-/epics/#{epic.iid}/issues/#{epic_issue1.id}", epic_issue_id: epic_issue1.id, due_date: nil, @@ -113,7 +113,7 @@ weight: nil, confidential: false, reference: issue3.to_reference(full: true), - path: "/#{other_project.full_path}/issues/#{issue3.iid}", + path: "/#{other_project.full_path}/-/issues/#{issue3.iid}", relation_path: "/groups/#{group.full_path}/-/epics/#{epic.iid}/issues/#{epic_issue3.id}", epic_issue_id: epic_issue3.id, due_date: nil, @@ -142,7 +142,7 @@ weight: nil, confidential: false, reference: issue2.to_reference(full: true), - path: "/#{project.full_path}/issues/#{issue2.iid}", + path: "/#{project.full_path}/-/issues/#{issue2.iid}", relation_path: nil, epic_issue_id: epic_issue2.id, due_date: nil, @@ -158,7 +158,7 @@ weight: 1, confidential: false, reference: issue1.to_reference(full: true), - path: "/#{project.full_path}/issues/#{issue1.iid}", + path: "/#{project.full_path}/-/issues/#{issue1.iid}", relation_path: nil, epic_issue_id: epic_issue1.id, due_date: nil, diff --git a/ee/spec/services/issue_links/list_service_spec.rb b/ee/spec/services/issue_links/list_service_spec.rb index 2197c36025850660151f65f3e8e0c61dd5747022..e7517c12975f34eef8fa67d4e31bd1cb0e86c76a 100644 --- a/ee/spec/services/issue_links/list_service_spec.rb +++ b/ee/spec/services/issue_links/list_service_spec.rb @@ -59,22 +59,22 @@ title: issue_b.title, state: issue_b.state, reference: issue_b.to_reference(project), - path: "/#{project.full_path}/issues/#{issue_b.iid}", - relation_path: "/#{project.full_path}/issues/#{issue.iid}/links/#{issue_link_a.id}")) + path: "/#{project.full_path}/-/issues/#{issue_b.iid}", + relation_path: "/#{project.full_path}/-/issues/#{issue.iid}/links/#{issue_link_a.id}")) expect(subject).to include(include(id: issue_c.id, title: issue_c.title, state: issue_c.state, reference: issue_c.to_reference(project), - path: "/#{project.full_path}/issues/#{issue_c.iid}", - relation_path: "/#{project.full_path}/issues/#{issue.iid}/links/#{issue_link_b.id}")) + path: "/#{project.full_path}/-/issues/#{issue_c.iid}", + relation_path: "/#{project.full_path}/-/issues/#{issue.iid}/links/#{issue_link_b.id}")) expect(subject).to include(include(id: issue_d.id, title: issue_d.title, state: issue_d.state, reference: issue_d.to_reference(project), - path: "/#{project.full_path}/issues/#{issue_d.iid}", - relation_path: "/#{project.full_path}/issues/#{issue.iid}/links/#{issue_link_c.id}")) + path: "/#{project.full_path}/-/issues/#{issue_d.iid}", + relation_path: "/#{project.full_path}/-/issues/#{issue.iid}/links/#{issue_link_c.id}")) end end @@ -188,7 +188,7 @@ it 'returns related issue destroy relation path' do expect(subject.first[:relation_path]) - .to eq("/#{project.full_path}/issues/#{issue.iid}/links/#{issue_link.id}") + .to eq("/#{project.full_path}/-/issues/#{issue.iid}/links/#{issue_link.id}") end end end diff --git a/spec/helpers/award_emoji_helper_spec.rb b/spec/helpers/award_emoji_helper_spec.rb index 975f32edd42e0ff0bc7942e057af8f5fa4cf56ea..3dee466a80cf252b28e6e97d30c68299b367018b 100644 --- a/spec/helpers/award_emoji_helper_spec.rb +++ b/spec/helpers/award_emoji_helper_spec.rb @@ -64,7 +64,7 @@ it 'returns correct url' do @project = issue.project - expected_url = "/#{@project.namespace.path}/#{@project.path}/issues/#{issue.iid}/toggle_award_emoji" + expected_url = "/#{@project.namespace.path}/#{@project.path}/-/issues/#{issue.iid}/toggle_award_emoji" expect(subject).to eq(expected_url) end diff --git a/spec/helpers/boards_helper_spec.rb b/spec/helpers/boards_helper_spec.rb index e731b95586f75473c4c53a6341a8f9afcf492056..f5e5285554c8b41829ba6f3cc9aa707d8d0afc16 100644 --- a/spec/helpers/boards_helper_spec.rb +++ b/spec/helpers/boards_helper_spec.rb @@ -11,7 +11,7 @@ @project = project @board = create(:board, project: @project) - expect(build_issue_link_base).to eq("/#{@project.namespace.path}/#{@project.path}/issues") + expect(build_issue_link_base).to eq("/#{@project.namespace.path}/#{@project.path}/-/issues") end end diff --git a/spec/helpers/events_helper_spec.rb b/spec/helpers/events_helper_spec.rb index 062fa8f106e069ea8bc90dd6fb825b9ef3637c41..612291277705bc0b4de55848a7a0b2fc3a84f2f2 100644 --- a/spec/helpers/events_helper_spec.rb +++ b/spec/helpers/events_helper_spec.rb @@ -110,7 +110,7 @@ it 'returns a project issue url' do event.target = create(:note_on_issue, note: 'nice work') - expect(subject).to eq("#{project_base_url}/issues/#{event.note_target.iid}#note_#{event.target.id}") + expect(subject).to eq("#{project_base_url}/-/issues/#{event.note_target.iid}#note_#{event.target.id}") end it 'returns a merge request url' do diff --git a/spec/helpers/issuables_helper_spec.rb b/spec/helpers/issuables_helper_spec.rb index a39110d0aa76730ca133ba96e088b758202fa6d2..7971eb8849db573eea34fe401a70e054b60251a5 100644 --- a/spec/helpers/issuables_helper_spec.rb +++ b/spec/helpers/issuables_helper_spec.rb @@ -183,8 +183,8 @@ @project = issue.project expected_data = { - endpoint: "/#{@project.full_path}/issues/#{issue.iid}", - updateEndpoint: "/#{@project.full_path}/issues/#{issue.iid}.json", + endpoint: "/#{@project.full_path}/-/issues/#{issue.iid}", + updateEndpoint: "/#{@project.full_path}/-/issues/#{issue.iid}.json", canUpdate: true, canDestroy: true, issuableRef: "##{issue.iid}", diff --git a/spec/helpers/issues_helper_spec.rb b/spec/helpers/issues_helper_spec.rb index a394812f8f0c02e603c25508cbc82d81f7691a07..dad740d3b80ffee6a0ddc51c2e47f9694c5d1feb 100644 --- a/spec/helpers/issues_helper_spec.rb +++ b/spec/helpers/issues_helper_spec.rb @@ -200,7 +200,7 @@ shared_examples 'successfully displays link to issue and with css class' do |action| it 'returns link' do - link = "(#{action})" + link = "(#{action})" expect(helper.issue_closed_link(issue, user, css_class: css_class)).to match(link) end diff --git a/spec/helpers/labels_helper_spec.rb b/spec/helpers/labels_helper_spec.rb index 322390c38404e5bdcbf4c5e41fe16b17c83a779d..ec70041d51f5dd0d4add3fb33ad65ec505dad3cf 100644 --- a/spec/helpers/labels_helper_spec.rb +++ b/spec/helpers/labels_helper_spec.rb @@ -56,7 +56,7 @@ context 'without subject' do it "uses the label's project" do - expect(link_to_label(label_presenter)).to match %r{.*}m + expect(link_to_label(label_presenter)).to match %r{.*}m end end @@ -65,7 +65,7 @@ let(:subject) { build(:project, namespace: namespace, name: 'bar3') } it 'links to project issues page' do - expect(link_to_label(label_presenter)).to match %r{.*}m + expect(link_to_label(label_presenter)).to match %r{.*}m end end @@ -78,15 +78,7 @@ end context 'with a type argument' do - ['issue', :issue].each do |type| - context "set to #{type}" do - it 'links to correct page' do - expect(link_to_label(label_presenter, type: type)).to match %r{.*}m - end - end - end - - ['merge_request', :merge_request].each do |type| + ['issue', :issue, 'merge_request', :merge_request].each do |type| context "set to #{type}" do it 'links to correct page' do expect(link_to_label(label_presenter, type: type)).to match %r{.*}m diff --git a/spec/helpers/notes_helper_spec.rb b/spec/helpers/notes_helper_spec.rb index 1dc7f4e98ab84d70cb596addd7d78fe6e71403de..f074a918e7f924b064649940967c2ce9b6433af9 100644 --- a/spec/helpers/notes_helper_spec.rb +++ b/spec/helpers/notes_helper_spec.rb @@ -272,7 +272,7 @@ let(:note) { create(:note_on_issue, noteable: issue, project: project) } it 'returns the noteable url with an anchor to the note' do - expect(noteable_note_url(note)).to match("/#{project.namespace.path}/#{project.path}/issues/#{issue.iid}##{dom_id(note)}") + expect(noteable_note_url(note)).to match("/#{project.namespace.path}/#{project.path}/-/issues/#{issue.iid}##{dom_id(note)}") end end diff --git a/spec/javascripts/diffs/mock_data/diff_discussions.js b/spec/javascripts/diffs/mock_data/diff_discussions.js index a9b006341040668eb938d4c39ac7e6787995382b..dc25dd1647a52c1121ee111fe157e18a9854b69e 100644 --- a/spec/javascripts/diffs/mock_data/diff_discussions.js +++ b/spec/javascripts/diffs/mock_data/diff_discussions.js @@ -64,7 +64,7 @@ export default { resolve_path: '/gitlab-org/gitlab-test/-/merge_requests/20/discussions/6b232e05bea388c6b043ccc243ba505faac04ea8/resolve', resolve_with_issue_path: - '/gitlab-org/gitlab-test/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20', + '/gitlab-org/gitlab-test/-/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20', }, { id: '1753', @@ -117,7 +117,7 @@ export default { resolve_path: '/gitlab-org/gitlab-test/-/merge_requests/20/discussions/6b232e05bea388c6b043ccc243ba505faac04ea8/resolve', resolve_with_issue_path: - '/gitlab-org/gitlab-test/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20', + '/gitlab-org/gitlab-test/-/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20', }, { id: '1754', @@ -160,7 +160,7 @@ export default { resolve_path: '/gitlab-org/gitlab-test/-/merge_requests/20/discussions/6b232e05bea388c6b043ccc243ba505faac04ea8/resolve', resolve_with_issue_path: - '/gitlab-org/gitlab-test/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20', + '/gitlab-org/gitlab-test/-/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20', }, { id: '1755', @@ -203,7 +203,7 @@ export default { resolve_path: '/gitlab-org/gitlab-test/-/merge_requests/20/discussions/6b232e05bea388c6b043ccc243ba505faac04ea8/resolve', resolve_with_issue_path: - '/gitlab-org/gitlab-test/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20', + '/gitlab-org/gitlab-test/-/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20', }, { id: '1756', @@ -246,7 +246,7 @@ export default { resolve_path: '/gitlab-org/gitlab-test/-/merge_requests/20/discussions/6b232e05bea388c6b043ccc243ba505faac04ea8/resolve', resolve_with_issue_path: - '/gitlab-org/gitlab-test/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20', + '/gitlab-org/gitlab-test/-/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20', }, ], individual_note: false, @@ -255,7 +255,7 @@ export default { resolve_path: '/gitlab-org/gitlab-test/-/merge_requests/20/discussions/6b232e05bea388c6b043ccc243ba505faac04ea8/resolve', resolve_with_issue_path: - '/gitlab-org/gitlab-test/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20', + '/gitlab-org/gitlab-test/-/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20', diff_file: { submodule: false, submodule_link: null, diff --git a/spec/javascripts/issue_show/components/app_spec.js b/spec/javascripts/issue_show/components/app_spec.js index fdd6f4e6470633a7b76aa189503243a9ba15044c..f11d4f5ac334caaa058b46ce3158187da1da1cca 100644 --- a/spec/javascripts/issue_show/components/app_spec.js +++ b/spec/javascripts/issue_show/components/app_spec.js @@ -40,17 +40,19 @@ describe('Issuable output', () => { const IssuableDescriptionComponent = Vue.extend(issuableApp); mock = new MockAdapter(axios); - mock.onGet('/gitlab-org/gitlab-shell/issues/9/realtime_changes/realtime_changes').reply(() => { - const res = Promise.resolve([200, REALTIME_REQUEST_STACK[realtimeRequestCount]]); - realtimeRequestCount += 1; - return res; - }); + mock + .onGet('/gitlab-org/gitlab-shell/-/issues/9/realtime_changes/realtime_changes') + .reply(() => { + const res = Promise.resolve([200, REALTIME_REQUEST_STACK[realtimeRequestCount]]); + realtimeRequestCount += 1; + return res; + }); vm = new IssuableDescriptionComponent({ propsData: { canUpdate: true, canDestroy: true, - endpoint: '/gitlab-org/gitlab-shell/issues/9/realtime_changes', + endpoint: '/gitlab-org/gitlab-shell/-/issues/9/realtime_changes', updateEndpoint: gl.TEST_HOST, issuableRef: '#1', initialTitleHtml: '', diff --git a/spec/javascripts/vue_mr_widget/mock_data.js b/spec/javascripts/vue_mr_widget/mock_data.js index 048a5f88c99778bb89580d404d211b754e2a39c5..d11756d712ad74c50f553a29b38ca28fbfc9c380 100644 --- a/spec/javascripts/vue_mr_widget/mock_data.js +++ b/spec/javascripts/vue_mr_widget/mock_data.js @@ -216,7 +216,7 @@ export default { remove_wip_path: '/root/acets-app/-/merge_requests/22/remove_wip', cancel_auto_merge_path: '/root/acets-app/-/merge_requests/22/cancel_auto_merge', create_issue_to_resolve_discussions_path: - '/root/acets-app/issues/new?merge_request_to_resolve_discussions_of=22', + '/root/acets-app/-/issues/new?merge_request_to_resolve_discussions_of=22', merge_path: '/root/acets-app/-/merge_requests/22/merge', cherry_pick_in_fork_path: '/root/acets-app/forks?continue%5Bnotice%5D=You%27re+not+allowed+to+make+changes+to+this+project+directly.+A+fork+of+this+project+has+been+created+that+you+can+make+changes+in%2C+so+you+can+submit+a+merge+request.+Try+to+revert+this+commit+again.&continue%5Bnotice_now%5D=You%27re+not+allowed+to+make+changes+to+this+project+directly.+A+fork+of+this+project+is+being+created+that+you+can+make+changes+in%2C+so+you+can+submit+a+merge+request.&continue%5Bto%5D=%2Froot%2Facets-app%2Fmerge_requests%2F22&namespace_key=1', diff --git a/spec/lib/gitlab/url_builder_spec.rb b/spec/lib/gitlab/url_builder_spec.rb index 49011b100ab3a20c9f696e00d5098f0924eba197..11bbf444b1d393b9faa998e292be4451c0dde2b0 100644 --- a/spec/lib/gitlab/url_builder_spec.rb +++ b/spec/lib/gitlab/url_builder_spec.rb @@ -20,7 +20,7 @@ url = described_class.build(issue) - expect(url).to eq "#{Settings.gitlab['url']}/#{issue.project.full_path}/issues/#{issue.iid}" + expect(url).to eq "#{Settings.gitlab['url']}/#{issue.project.full_path}/-/issues/#{issue.iid}" end end @@ -107,7 +107,7 @@ url = described_class.build(note) - expect(url).to eq "#{Settings.gitlab['url']}/#{issue.project.full_path}/issues/#{issue.iid}#note_#{note.id}" + expect(url).to eq "#{Settings.gitlab['url']}/#{issue.project.full_path}/-/issues/#{issue.iid}#note_#{note.id}" end end diff --git a/spec/models/project_services/gitlab_issue_tracker_service_spec.rb b/spec/models/project_services/gitlab_issue_tracker_service_spec.rb index defebcee9c672f6b050d3e42552c045df1d80414..7f1c6224b7df94e879a0a4ebd9a4fc79755abb89 100644 --- a/spec/models/project_services/gitlab_issue_tracker_service_spec.rb +++ b/spec/models/project_services/gitlab_issue_tracker_service_spec.rb @@ -33,9 +33,9 @@ end it 'gives the correct path' do - expect(service.project_url).to eq("http://#{Gitlab.config.gitlab.host}/gitlab/root/#{project.full_path}/issues") - expect(service.new_issue_url).to eq("http://#{Gitlab.config.gitlab.host}/gitlab/root/#{project.full_path}/issues/new") - expect(service.issue_url(432)).to eq("http://#{Gitlab.config.gitlab.host}/gitlab/root/#{project.full_path}/issues/432") + expect(service.project_url).to eq("http://#{Gitlab.config.gitlab.host}/gitlab/root/#{project.full_path}/-/issues") + expect(service.new_issue_url).to eq("http://#{Gitlab.config.gitlab.host}/gitlab/root/#{project.full_path}/-/issues/new") + expect(service.issue_url(432)).to eq("http://#{Gitlab.config.gitlab.host}/gitlab/root/#{project.full_path}/-/issues/432") end end @@ -45,9 +45,9 @@ end it 'gives the correct path' do - expect(service.issue_tracker_path).to eq("/gitlab/root/#{project.full_path}/issues") - expect(service.new_issue_path).to eq("/gitlab/root/#{project.full_path}/issues/new") - expect(service.issue_path(432)).to eq("/gitlab/root/#{project.full_path}/issues/432") + expect(service.issue_tracker_path).to eq("/gitlab/root/#{project.full_path}/-/issues") + expect(service.new_issue_path).to eq("/gitlab/root/#{project.full_path}/-/issues/new") + expect(service.issue_path(432)).to eq("/gitlab/root/#{project.full_path}/-/issues/432") end end end diff --git a/spec/presenters/issue_presenter_spec.rb b/spec/presenters/issue_presenter_spec.rb index 1eb674d1f8f1d523986c8eab9b4f295859a7a4ef..4a4caef9d286875347a6a1d7fd13ec2cba4b3cbe 100644 --- a/spec/presenters/issue_presenter_spec.rb +++ b/spec/presenters/issue_presenter_spec.rb @@ -17,7 +17,7 @@ describe '#web_url' do it 'returns correct path' do - expect(presenter.web_url).to eq("http://localhost/#{group.name}/#{project.name}/issues/#{issue.iid}") + expect(presenter.web_url).to eq("http://localhost/#{group.name}/#{project.name}/-/issues/#{issue.iid}") end end @@ -37,7 +37,7 @@ describe '#issue_path' do it 'returns correct path' do - expect(presenter.issue_path).to eq("/#{group.name}/#{project.name}/issues/#{issue.iid}") + expect(presenter.issue_path).to eq("/#{group.name}/#{project.name}/-/issues/#{issue.iid}") end end end diff --git a/spec/presenters/merge_request_presenter_spec.rb b/spec/presenters/merge_request_presenter_spec.rb index 025f083ab275adb1a58b9dea1bb0cd21ea0b059a..f184e767f8ce8e9a6defa7fc5e630a11486f419f 100644 --- a/spec/presenters/merge_request_presenter_spec.rb +++ b/spec/presenters/merge_request_presenter_spec.rb @@ -128,11 +128,11 @@ subject { described_class.new(resource, current_user: user).closing_issues_links } it 'presents closing issues links' do - is_expected.to match("#{project.full_path}/issues/#{issue_a.iid}") + is_expected.to match("#{project.full_path}/-/issues/#{issue_a.iid}") end it 'does not present related issues links' do - is_expected.not_to match("#{project.full_path}/issues/#{issue_b.iid}") + is_expected.not_to match("#{project.full_path}/-/issues/#{issue_b.iid}") end it 'appends status when closing issue is already closed' do @@ -148,11 +148,11 @@ end it 'presents related issues links' do - is_expected.to match("#{project.full_path}/issues/#{issue_b.iid}") + is_expected.to match("#{project.full_path}/-/issues/#{issue_b.iid}") end it 'does not present closing issues links' do - is_expected.not_to match("#{project.full_path}/issues/#{issue_a.iid}") + is_expected.not_to match("#{project.full_path}/-/issues/#{issue_a.iid}") end it 'appends status when mentioned issue is already closed' do @@ -275,7 +275,7 @@ project.add_maintainer(user) is_expected - .to eq("/#{resource.project.full_path}/issues/new?merge_request_to_resolve_discussions_of=#{resource.iid}") + .to eq("/#{resource.project.full_path}/-/issues/new?merge_request_to_resolve_discussions_of=#{resource.iid}") end end diff --git a/spec/requests/api/releases_spec.rb b/spec/requests/api/releases_spec.rb index 12fd9f431e551141ca041f3bba56c0dc2a4cb6f4..f9e7253a88b743987133b52fcbbb9b9eccedaef6 100644 --- a/spec/requests/api/releases_spec.rb +++ b/spec/requests/api/releases_spec.rb @@ -78,7 +78,7 @@ issue_uri = URI.parse(links['issues_url']) expect(mr_uri.path).to eq("#{path_base}/-/merge_requests") - expect(issue_uri.path).to eq("#{path_base}/issues") + expect(issue_uri.path).to eq("#{path_base}/-/issues") expect(mr_uri.query).to eq(expected_query) expect(issue_uri.query).to eq(expected_query) end diff --git a/spec/services/error_tracking/issue_details_service_spec.rb b/spec/services/error_tracking/issue_details_service_spec.rb index 9f217deda21e53fde8bc55dad32469fff69efaf3..66b8988f8e3edc539c1852433cb23feecc9cee2d 100644 --- a/spec/services/error_tracking/issue_details_service_spec.rb +++ b/spec/services/error_tracking/issue_details_service_spec.rb @@ -27,7 +27,7 @@ create(:sentry_issue, issue: gitlab_issue, sentry_issue_identifier: detailed_error.id) expect(result[:issue].gitlab_issue).to include( - "http", "/#{project.full_path}/issues/#{gitlab_issue.iid}" + "http", "/#{project.full_path}/-/issues/#{gitlab_issue.iid}" ) end