Commit 47691f47 authored by Fatih Acet's avatar Fatih Acet

Merge branch 'sh-trim-extra-periods-merge-error' into 'master'

Trim extra period when merge error displayed

See merge request gitlab-org/gitlab!23737
parents 7b1d23ab 09799220
......@@ -121,8 +121,14 @@ export default {
);
},
mergeError() {
let { mergeError } = this.mr;
if (mergeError && mergeError.slice(-1) === '.') {
mergeError = mergeError.slice(0, -1);
}
return sprintf(s__('mrWidget|Merge failed: %{mergeError}. Please try again.'), {
mergeError: this.mr.mergeError,
mergeError,
});
},
},
......
---
title: Trim extra period when merge error displayed
merge_request: 23737
author:
type: fixed
......@@ -152,7 +152,7 @@ describe 'Merge request > User merges when pipeline succeeds', :js do
before do
merge_request.update(
merge_user: merge_request.author,
merge_error: 'Something went wrong'
merge_error: 'Something went wrong.'
)
refresh
end
......@@ -162,7 +162,7 @@ describe 'Merge request > User merges when pipeline succeeds', :js do
wait_for_requests
page.within('.mr-section-container') do
expect(page).to have_content('Merge failed: Something went wrong')
expect(page).to have_content('Merge failed: Something went wrong. Please try again.')
end
end
end
......@@ -171,7 +171,7 @@ describe 'Merge request > User merges when pipeline succeeds', :js do
before do
merge_request.update(
merge_user: merge_request.author,
merge_error: 'Something went wrong'
merge_error: 'Something went wrong.'
)
refresh
end
......@@ -181,7 +181,7 @@ describe 'Merge request > User merges when pipeline succeeds', :js do
wait_for_requests
page.within('.mr-section-container') do
expect(page).to have_content('Merge failed: Something went wrong')
expect(page).to have_content('Merge failed: Something went wrong. Please try again.')
end
end
end
......
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