Commit 059b3e36 authored by Nathan Friend's avatar Nathan Friend Committed by Lin Jen-Shin

Remove "target branch advanced" warning from FE code (CE)

Removes the "target branch advanced" warning from the frontend
as it is no longer needed due to the new merge trains feature.
parent e206e66b
...@@ -117,14 +117,6 @@ export default { ...@@ -117,14 +117,6 @@ export default {
this.mr.mergePipelinesEnabled && this.mr.sourceProjectId !== this.mr.targetProjectId, this.mr.mergePipelinesEnabled && this.mr.sourceProjectId !== this.mr.targetProjectId,
); );
}, },
showTargetBranchAdvancedError() {
return Boolean(
this.mr.isOpen &&
this.mr.pipeline &&
this.mr.pipeline.target_sha &&
this.mr.pipeline.target_sha !== this.mr.targetBranchSha,
);
},
mergeError() { mergeError() {
return sprintf(s__('mrWidget|Merge failed: %{mergeError}. Please try again.'), { return sprintf(s__('mrWidget|Merge failed: %{mergeError}. Please try again.'), {
mergeError: this.mr.mergeError, mergeError: this.mr.mergeError,
...@@ -363,18 +355,6 @@ export default { ...@@ -363,18 +355,6 @@ export default {
}} }}
</mr-widget-alert-message> </mr-widget-alert-message>
<mr-widget-alert-message
v-if="showTargetBranchAdvancedError"
type="danger"
:help-path="mr.mergeRequestPipelinesHelpPath"
>
{{
s__(
'mrWidget|The target branch has advanced, which invalidates the merge request pipeline. Please update the source branch and retry merging',
)
}}
</mr-widget-alert-message>
<mr-widget-alert-message v-if="mr.mergeError" type="danger"> <mr-widget-alert-message v-if="mr.mergeError" type="danger">
{{ mergeError }} {{ mergeError }}
</mr-widget-alert-message> </mr-widget-alert-message>
......
...@@ -12408,9 +12408,6 @@ msgstr "" ...@@ -12408,9 +12408,6 @@ msgstr ""
msgid "mrWidget|The source branch will not be deleted" msgid "mrWidget|The source branch will not be deleted"
msgstr "" msgstr ""
msgid "mrWidget|The target branch has advanced, which invalidates the merge request pipeline. Please update the source branch and retry merging"
msgstr ""
msgid "mrWidget|There are merge conflicts" msgid "mrWidget|There are merge conflicts"
msgstr "" msgstr ""
......
...@@ -222,60 +222,6 @@ describe('mrWidgetOptions', () => { ...@@ -222,60 +222,6 @@ describe('mrWidgetOptions', () => {
}); });
}); });
}); });
describe('showTargetBranchAdvancedError', () => {
describe(`when the pipeline's target_sha property doesn't exist`, () => {
beforeEach(done => {
Vue.set(vm.mr, 'isOpen', true);
Vue.set(vm.mr.pipeline, 'target_sha', undefined);
Vue.set(vm.mr, 'targetBranchSha', 'abcd');
vm.$nextTick(done);
});
it('should be false', () => {
expect(vm.showTargetBranchAdvancedError).toEqual(false);
});
});
describe(`when the pipeline's target_sha matches the target branch's sha`, () => {
beforeEach(done => {
Vue.set(vm.mr, 'isOpen', true);
Vue.set(vm.mr.pipeline, 'target_sha', 'abcd');
Vue.set(vm.mr, 'targetBranchSha', 'abcd');
vm.$nextTick(done);
});
it('should be false', () => {
expect(vm.showTargetBranchAdvancedError).toEqual(false);
});
});
describe(`when the merge request is not open`, () => {
beforeEach(done => {
Vue.set(vm.mr, 'isOpen', false);
Vue.set(vm.mr.pipeline, 'target_sha', 'abcd');
Vue.set(vm.mr, 'targetBranchSha', 'bcde');
vm.$nextTick(done);
});
it('should be false', () => {
expect(vm.showTargetBranchAdvancedError).toEqual(false);
});
});
describe(`when the pipeline's target_sha does not match the target branch's sha`, () => {
beforeEach(done => {
Vue.set(vm.mr, 'isOpen', true);
Vue.set(vm.mr.pipeline, 'target_sha', 'abcd');
Vue.set(vm.mr, 'targetBranchSha', 'bcde');
vm.$nextTick(done);
});
it('should be true', () => {
expect(vm.showTargetBranchAdvancedError).toEqual(true);
});
});
});
}); });
describe('methods', () => { describe('methods', () => {
......
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