Commit 8474a0ba authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'msjr-no-issue-found-for-params' into 'master'

Resolve "Improve text for error "No issue found for given params" in UI"

See merge request gitlab-org/gitlab!45064
parents 5894d37d cd6985e3
......@@ -107,11 +107,11 @@ module IssuableLinks
end
def issuables_assigned_message
'Issue(s) already assigned'
_("Issue(s) already assigned")
end
def issuables_not_found_message
'No Issue found for given params'
_("No matching issue found. Make sure that you are adding a valid issue URL.")
end
end
end
......
---
title: Resolve Improve text for error No issue found for given params in UI
merge_request: 45064
author:
type: other
......@@ -45,7 +45,7 @@ RSpec.describe Mutations::Epics::AddIssue do
it 'returns error if issue is not found' do
issue.update!(project: create(:project))
expect(subject[:errors]).to eq('No Issue found for given params')
expect(subject[:errors]).to eq('No matching issue found. Make sure that you are adding a valid issue URL.')
end
end
end
......
......@@ -117,7 +117,7 @@ RSpec.describe API::EpicIssues do
post api(url, user)
expect(response).to have_gitlab_http_status(:not_found)
expect(json_response).to eq('message' => 'No Issue found for given params')
expect(json_response).to eq('message' => 'No matching issue found. Make sure that you are adding a valid issue URL.')
end
end
end
......
......@@ -70,7 +70,7 @@ RSpec.describe EpicIssues::CreateService do
shared_examples 'returns an error' do
it 'returns an error' do
expect(subject).to eq(message: 'No Issue found for given params', status: :error, http_status: 404)
expect(subject).to eq(message: 'No matching issue found. Make sure that you are adding a valid issue URL.', status: :error, http_status: 404)
end
it 'no relationship is created' do
......
......@@ -17073,6 +17073,9 @@ msgstr ""
msgid "Issue weight"
msgstr ""
msgid "Issue(s) already assigned"
msgstr ""
msgid "IssueAnalytics|Age"
msgstr ""
......@@ -20768,6 +20771,9 @@ msgstr ""
msgid "No matches found"
msgstr ""
msgid "No matching issue found. Make sure that you are adding a valid issue URL."
msgstr ""
msgid "No matching labels"
msgstr ""
......
......@@ -82,7 +82,7 @@ RSpec.describe API::IssueLinks do
params: { target_project_id: unauthorized_project.id, target_issue_iid: target_issue.iid }
expect(response).to have_gitlab_http_status(:not_found)
expect(json_response['message']).to eq('No Issue found for given params')
expect(json_response['message']).to eq('No matching issue found. Make sure that you are adding a valid issue URL.')
end
end
......
......@@ -71,7 +71,7 @@ RSpec.describe Projects::IssueLinksController do
list_service_response = IssueLinks::ListService.new(issue, user).execute
expect(response).to have_gitlab_http_status(:not_found)
expect(json_response).to eq('message' => 'No Issue found for given params', 'issuables' => list_service_response.as_json)
expect(json_response).to eq('message' => 'No matching issue found. Make sure that you are adding a valid issue URL.', 'issuables' => list_service_response.as_json)
end
end
end
......
......@@ -24,7 +24,7 @@ RSpec.describe IssueLinks::CreateService do
end
it 'returns error' do
is_expected.to eq(message: 'No Issue found for given params', status: :error, http_status: 404)
is_expected.to eq(message: 'No matching issue found. Make sure that you are adding a valid issue URL.', status: :error, http_status: 404)
end
end
......@@ -34,7 +34,7 @@ RSpec.describe IssueLinks::CreateService do
end
it 'returns error' do
is_expected.to eq(message: 'No Issue found for given params', status: :error, http_status: 404)
is_expected.to eq(message: 'No matching issue found. Make sure that you are adding a valid issue URL.', status: :error, http_status: 404)
end
it 'no relationship is created' do
......@@ -52,7 +52,7 @@ RSpec.describe IssueLinks::CreateService do
it 'returns error' do
target_issuable.project.add_guest(user)
is_expected.to eq(message: 'No Issue found for given params', status: :error, http_status: 404)
is_expected.to eq(message: 'No matching issue found. Make sure that you are adding a valid issue URL.', status: :error, http_status: 404)
end
it 'no relationship is created' do
......
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