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