Commit 650ef4e7 authored by Amy Qualls's avatar Amy Qualls Committed by Miguel Rincon

Update UI message for merge conflicts

As part of reviewing our UI strings mentioning merge requests, this change updates the merge request message:

* OLD: "There are merge conflicts"
* NEW: "Merge blocked: merge conflicts must be resolved."

Changelog: changed
parent f922bc59
...@@ -117,11 +117,12 @@ export default { ...@@ -117,11 +117,12 @@ export default {
</span> </span>
<template v-else> <template v-else>
<span class="bold"> <span class="bold">
{{ s__('mrWidget|There are merge conflicts') }}<span v-if="!canMerge">.</span> {{ s__('mrWidget|Merge blocked: merge conflicts must be resolved.') }}
<span v-if="!canMerge"> <span v-if="!canMerge">
{{ {{
s__(`mrWidget|Resolve these conflicts or ask someone s__(
with write access to this repository to merge it locally`) `mrWidget|Users who can write to the source or target branches can resolve the conflicts.`,
)
}} }}
</span> </span>
</span> </span>
......
...@@ -41496,6 +41496,9 @@ msgstr "" ...@@ -41496,6 +41496,9 @@ msgstr ""
msgid "mrWidget|Merge blocked: fast-forward merge is not possible. To merge this request, first rebase locally." msgid "mrWidget|Merge blocked: fast-forward merge is not possible. To merge this request, first rebase locally."
msgstr "" msgstr ""
msgid "mrWidget|Merge blocked: merge conflicts must be resolved."
msgstr ""
msgid "mrWidget|Merge blocked: pipeline must succeed. It's waiting for a manual action to continue." msgid "mrWidget|Merge blocked: pipeline must succeed. It's waiting for a manual action to continue."
msgstr "" msgstr ""
...@@ -41574,9 +41577,6 @@ msgstr "" ...@@ -41574,9 +41577,6 @@ msgstr ""
msgid "mrWidget|Resolve conflicts" msgid "mrWidget|Resolve conflicts"
msgstr "" msgstr ""
msgid "mrWidget|Resolve these conflicts or ask someone with write access to this repository to merge it locally"
msgstr ""
msgid "mrWidget|Revert" msgid "mrWidget|Revert"
msgstr "" msgstr ""
...@@ -41622,9 +41622,6 @@ msgstr "" ...@@ -41622,9 +41622,6 @@ msgstr ""
msgid "mrWidget|The source branch is being deleted" msgid "mrWidget|The source branch is being deleted"
msgstr "" msgstr ""
msgid "mrWidget|There are merge conflicts"
msgstr ""
msgid "mrWidget|This merge request failed to be merged automatically" msgid "mrWidget|This merge request failed to be merged automatically"
msgstr "" msgstr ""
...@@ -41637,6 +41634,9 @@ msgstr "" ...@@ -41637,6 +41634,9 @@ msgstr ""
msgid "mrWidget|To merge, a Jira issue key must be mentioned in the title or description." msgid "mrWidget|To merge, a Jira issue key must be mentioned in the title or description."
msgstr "" msgstr ""
msgid "mrWidget|Users who can write to the source or target branches can resolve the conflicts."
msgstr ""
msgid "mrWidget|What is a merge train?" msgid "mrWidget|What is a merge train?"
msgstr "" msgstr ""
......
...@@ -12,6 +12,14 @@ describe('MRWidgetConflicts', () => { ...@@ -12,6 +12,14 @@ describe('MRWidgetConflicts', () => {
const findResolveButton = () => wrapper.findByTestId('resolve-conflicts-button'); const findResolveButton = () => wrapper.findByTestId('resolve-conflicts-button');
const findMergeLocalButton = () => wrapper.findByTestId('merge-locally-button'); const findMergeLocalButton = () => wrapper.findByTestId('merge-locally-button');
const mergeConflictsText = 'Merge blocked: merge conflicts must be resolved.';
const fastForwardMergeText =
'Merge blocked: fast-forward merge is not possible. To merge this request, first rebase locally.';
const userCannotMergeText =
'Users who can write to the source or target branches can resolve the conflicts.';
const resolveConflictsBtnText = 'Resolve conflicts';
const mergeLocallyBtnText = 'Merge locally';
function createComponent(propsData = {}) { function createComponent(propsData = {}) {
wrapper = extendedWrapper( wrapper = extendedWrapper(
shallowMount(ConflictsComponent, { shallowMount(ConflictsComponent, {
...@@ -81,16 +89,16 @@ describe('MRWidgetConflicts', () => { ...@@ -81,16 +89,16 @@ describe('MRWidgetConflicts', () => {
}); });
it('should tell you about conflicts without bothering other people', () => { it('should tell you about conflicts without bothering other people', () => {
expect(wrapper.text()).toContain('There are merge conflicts'); expect(wrapper.text()).toContain(mergeConflictsText);
expect(wrapper.text()).not.toContain('ask someone with write access'); expect(wrapper.text()).not.toContain(userCannotMergeText);
}); });
it('should not allow you to resolve the conflicts', () => { it('should not allow you to resolve the conflicts', () => {
expect(wrapper.text()).not.toContain('Resolve conflicts'); expect(wrapper.text()).not.toContain(resolveConflictsBtnText);
}); });
it('should have merge buttons', () => { it('should have merge buttons', () => {
expect(findMergeLocalButton().text()).toContain('Merge locally'); expect(findMergeLocalButton().text()).toContain(mergeLocallyBtnText);
}); });
}); });
...@@ -107,17 +115,17 @@ describe('MRWidgetConflicts', () => { ...@@ -107,17 +115,17 @@ describe('MRWidgetConflicts', () => {
}); });
it('should tell you about conflicts', () => { it('should tell you about conflicts', () => {
expect(wrapper.text()).toContain('There are merge conflicts'); expect(wrapper.text()).toContain(mergeConflictsText);
expect(wrapper.text()).toContain('ask someone with write access'); expect(wrapper.text()).toContain(userCannotMergeText);
}); });
it('should allow you to resolve the conflicts', () => { it('should allow you to resolve the conflicts', () => {
expect(findResolveButton().text()).toContain('Resolve conflicts'); expect(findResolveButton().text()).toContain(resolveConflictsBtnText);
expect(findResolveButton().attributes('href')).toEqual(path); expect(findResolveButton().attributes('href')).toEqual(path);
}); });
it('should not have merge buttons', () => { it('should not have merge buttons', () => {
expect(wrapper.text()).not.toContain('Merge locally'); expect(wrapper.text()).not.toContain(mergeLocallyBtnText);
}); });
}); });
...@@ -134,17 +142,17 @@ describe('MRWidgetConflicts', () => { ...@@ -134,17 +142,17 @@ describe('MRWidgetConflicts', () => {
}); });
it('should tell you about conflicts without bothering other people', () => { it('should tell you about conflicts without bothering other people', () => {
expect(wrapper.text()).toContain('There are merge conflicts'); expect(wrapper.text()).toContain(mergeConflictsText);
expect(wrapper.text()).not.toContain('ask someone with write access'); expect(wrapper.text()).not.toContain(userCannotMergeText);
}); });
it('should allow you to resolve the conflicts', () => { it('should allow you to resolve the conflicts', () => {
expect(findResolveButton().text()).toContain('Resolve conflicts'); expect(findResolveButton().text()).toContain(resolveConflictsBtnText);
expect(findResolveButton().attributes('href')).toEqual(path); expect(findResolveButton().attributes('href')).toEqual(path);
}); });
it('should have merge buttons', () => { it('should have merge buttons', () => {
expect(findMergeLocalButton().text()).toContain('Merge locally'); expect(findMergeLocalButton().text()).toContain(mergeLocallyBtnText);
}); });
}); });
...@@ -158,9 +166,7 @@ describe('MRWidgetConflicts', () => { ...@@ -158,9 +166,7 @@ describe('MRWidgetConflicts', () => {
}, },
}); });
expect(wrapper.text().trim().replace(/\s\s+/g, ' ')).toContain( expect(wrapper.text().trim().replace(/\s\s+/g, ' ')).toContain(userCannotMergeText);
'ask someone with write access',
);
}); });
it('should not have action buttons', async () => { it('should not have action buttons', async () => {
...@@ -198,9 +204,7 @@ describe('MRWidgetConflicts', () => { ...@@ -198,9 +204,7 @@ describe('MRWidgetConflicts', () => {
}, },
}); });
expect(removeBreakLine(wrapper.text()).trim()).toContain( expect(removeBreakLine(wrapper.text()).trim()).toContain(fastForwardMergeText);
'Merge blocked: fast-forward merge is not possible. To merge this request, first rebase locally.',
);
}); });
}); });
...@@ -236,7 +240,7 @@ describe('MRWidgetConflicts', () => { ...@@ -236,7 +240,7 @@ describe('MRWidgetConflicts', () => {
}); });
it('should allow you to resolve the conflicts', () => { it('should allow you to resolve the conflicts', () => {
expect(findResolveButton().text()).toContain('Resolve conflicts'); expect(findResolveButton().text()).toContain(resolveConflictsBtnText);
expect(findResolveButton().attributes('href')).toEqual(TEST_HOST); expect(findResolveButton().attributes('href')).toEqual(TEST_HOST);
}); });
}); });
......
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