diff options
author | Sam Bigelow <sbigelow@gitlab.com> | 2019-01-10 07:08:52 +0300 |
---|---|---|
committer | Sam Bigelow <sbigelow@gitlab.com> | 2019-01-22 20:57:01 +0300 |
commit | c607b358241712af0d6b442b8e7a277cb6ba8a38 (patch) | |
tree | 0ac6dd259044b49e317724a542dbf05376070537 /spec/javascripts/vue_mr_widget | |
parent | 1b3affafab0f28c690ce93cc98ac6bd09cbda59f (diff) |
Use 'delete' instead of 'remove' for source branch
This is to match `git branch -D <branchname>`
Diffstat (limited to 'spec/javascripts/vue_mr_widget')
3 files changed, 20 insertions, 20 deletions
diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_merge_when_pipeline_succeeds_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_merge_when_pipeline_succeeds_spec.js index d46ad0acc9b..b9718a78fa4 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_merge_when_pipeline_succeeds_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_merge_when_pipeline_succeeds_spec.js @@ -121,14 +121,14 @@ describe('MRWidgetMergeWhenPipelineSucceeds', () => { expect(vm.$el.innerText).toContain('to be merged automatically when the pipeline succeeds'); expect(vm.$el.innerText).toContain('The changes will be merged into'); expect(vm.$el.innerText).toContain(targetBranch); - expect(vm.$el.innerText).toContain('The source branch will not be removed'); + expect(vm.$el.innerText).toContain('The source branch will not be deleted'); expect(vm.$el.querySelector('.js-cancel-auto-merge').innerText).toContain( 'Cancel automatic merge', ); expect(vm.$el.querySelector('.js-cancel-auto-merge').getAttribute('disabled')).toBeFalsy(); expect(vm.$el.querySelector('.js-remove-source-branch').innerText).toContain( - 'Remove source branch', + 'Delete source branch', ); expect(vm.$el.querySelector('.js-remove-source-branch').getAttribute('disabled')).toBeFalsy(); @@ -143,19 +143,19 @@ describe('MRWidgetMergeWhenPipelineSucceeds', () => { }); }); - it('should show source branch will be removed text when it source branch set to remove', done => { + it('should show source branch will be deleted text when it source branch set to remove', done => { vm.mr.shouldRemoveSourceBranch = true; Vue.nextTick(() => { const normalizedText = vm.$el.innerText.replace(/\s+/g, ' '); - expect(normalizedText).toContain('The source branch will be removed'); - expect(normalizedText).not.toContain('The source branch will not be removed'); + expect(normalizedText).toContain('The source branch will be deleted'); + expect(normalizedText).not.toContain('The source branch will not be deleted'); done(); }); }); - it('should not show remove source branch button when user not able to remove source branch', done => { + it('should not show delete source branch button when user not able to delete source branch', done => { vm.mr.currentUserId = 4; Vue.nextTick(() => { @@ -164,7 +164,7 @@ describe('MRWidgetMergeWhenPipelineSucceeds', () => { }); }); - it('should disable remove source branch button when the action is in progress', done => { + it('should disable delete source branch button when the action is in progress', done => { vm.isRemovingSourceBranch = true; Vue.nextTick(() => { diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_merged_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_merged_spec.js index da5cb752c6f..1683da805b9 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_merged_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_merged_spec.js @@ -128,7 +128,7 @@ describe('MRWidgetMerged', () => { new Promise(resolve => { resolve({ data: { - message: 'Branch was removed', + message: 'Branch was deleted', }, }); }), @@ -157,8 +157,8 @@ describe('MRWidgetMerged', () => { expect(vm.$el.textContent).toContain(targetBranch); }); - it('renders information about branch being removed', () => { - expect(vm.$el.textContent).toContain('The source branch has been removed'); + it('renders information about branch being deleted', () => { + expect(vm.$el.textContent).toContain('The source branch has been deleted'); }); it('shows revert and cherry-pick buttons', () => { @@ -189,24 +189,24 @@ describe('MRWidgetMerged', () => { expect(selectors.mergeCommitShaLink.href).toBe(vm.mr.mergeCommitPath); }); - it('should not show source branch removed text', done => { + it('should not show source branch deleted text', done => { vm.mr.sourceBranchRemoved = false; Vue.nextTick(() => { - expect(vm.$el.innerText).toContain('You can remove source branch now'); - expect(vm.$el.innerText).not.toContain('The source branch has been removed'); + expect(vm.$el.innerText).toContain('You can delete the source branch now'); + expect(vm.$el.innerText).not.toContain('The source branch has been deleted'); done(); }); }); - it('should show source branch removing text', done => { + it('should show source branch deleting text', done => { vm.mr.isRemovingSourceBranch = true; vm.mr.sourceBranchRemoved = false; Vue.nextTick(() => { - expect(vm.$el.innerText).toContain('The source branch is being removed'); - expect(vm.$el.innerText).not.toContain('You can remove source branch now'); - expect(vm.$el.innerText).not.toContain('The source branch has been removed'); + expect(vm.$el.innerText).toContain('The source branch is being deleted'); + expect(vm.$el.innerText).not.toContain('You can delete the source branch now'); + expect(vm.$el.innerText).not.toContain('The source branch has been deleted'); done(); }); }); diff --git a/spec/javascripts/vue_mr_widget/mr_widget_options_spec.js b/spec/javascripts/vue_mr_widget/mr_widget_options_spec.js index 99b80df766a..34b90c23c19 100644 --- a/spec/javascripts/vue_mr_widget/mr_widget_options_spec.js +++ b/spec/javascripts/vue_mr_widget/mr_widget_options_spec.js @@ -453,7 +453,7 @@ describe('mrWidgetOptions', () => { vm.$nextTick(() => { const tooltip = vm.$el.querySelector('.fa-question-circle'); - expect(vm.$el.textContent).toContain('Removes source branch'); + expect(vm.$el.textContent).toContain('Deletes source branch'); expect(tooltip.getAttribute('data-original-title')).toBe( 'A user with write access to the source branch selected this option', ); @@ -468,8 +468,8 @@ describe('mrWidgetOptions', () => { vm.mr.state = 'merged'; vm.$nextTick(() => { - expect(vm.$el.textContent).toContain('The source branch has been removed'); - expect(vm.$el.textContent).not.toContain('Removes source branch'); + expect(vm.$el.textContent).toContain('The source branch has been deleted'); + expect(vm.$el.textContent).not.toContain('Deletes source branch'); done(); }); |