Commit 3ed80785 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch '25569-changing-wording-to-delete-when-referring-to-removing-a-branch' into 'master'

Resolve "Changing wording to "Delete" when referring to removing a branch"

Closes #25569

See merge request gitlab-org/gitlab-ce!23966
parents da251c64 c607b358
...@@ -7,7 +7,7 @@ export default { ...@@ -7,7 +7,7 @@ export default {
tooltip, tooltip,
}, },
created() { created() {
this.removesBranchText = __('<strong>Removes</strong> source branch'); this.removesBranchText = __('<strong>Deletes</strong> source branch');
this.tooltipTitle = __('A user with write access to the source branch selected this option'); this.tooltipTitle = __('A user with write access to the source branch selected this option');
}, },
}; };
......
...@@ -106,11 +106,11 @@ export default { ...@@ -106,11 +106,11 @@ export default {
<a :href="mr.targetBranchPath" class="label-branch"> {{ mr.targetBranch }} </a> <a :href="mr.targetBranchPath" class="label-branch"> {{ mr.targetBranch }} </a>
</p> </p>
<p v-if="mr.shouldRemoveSourceBranch"> <p v-if="mr.shouldRemoveSourceBranch">
{{ s__('mrWidget|The source branch will be removed') }} {{ s__('mrWidget|The source branch will be deleted') }}
</p> </p>
<p v-else class="d-flex align-items-start"> <p v-else class="d-flex align-items-start">
<span class="append-right-10"> <span class="append-right-10">
{{ s__('mrWidget|The source branch will not be removed') }} {{ s__('mrWidget|The source branch will not be deleted') }}
</span> </span>
<a <a
v-if="canRemoveSourceBranch" v-if="canRemoveSourceBranch"
...@@ -121,7 +121,7 @@ export default { ...@@ -121,7 +121,7 @@ export default {
@click.prevent="removeSourceBranch" @click.prevent="removeSourceBranch"
> >
<i v-if="isRemovingSourceBranch" class="fa fa-spinner fa-spin" aria-hidden="true"> </i> <i v-if="isRemovingSourceBranch" class="fa fa-spinner fa-spin" aria-hidden="true"> </i>
{{ s__('mrWidget|Remove source branch') }} {{ s__('mrWidget|Delete source branch') }}
</a> </a>
</p> </p>
</section> </section>
......
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
.removeSourceBranch() .removeSourceBranch()
.then(res => res.data) .then(res => res.data)
.then(data => { .then(data => {
if (data.message === 'Branch was removed') { if (data.message === 'Branch was deleted') {
eventHub.$emit('MRWidgetUpdateRequested', () => { eventHub.$emit('MRWidgetUpdateRequested', () => {
this.isMakingRequest = false; this.isMakingRequest = false;
}); });
...@@ -174,22 +174,22 @@ export default { ...@@ -174,22 +174,22 @@ export default {
</template> </template>
</p> </p>
<p v-if="mr.sourceBranchRemoved"> <p v-if="mr.sourceBranchRemoved">
{{ s__('mrWidget|The source branch has been removed') }} {{ s__('mrWidget|The source branch has been deleted') }}
</p> </p>
<p v-if="shouldShowRemoveSourceBranch" class="space-children"> <p v-if="shouldShowRemoveSourceBranch" class="space-children">
<span>{{ s__('mrWidget|You can remove source branch now') }}</span> <span>{{ s__('mrWidget|You can delete the source branch now') }}</span>
<button <button
:disabled="isMakingRequest" :disabled="isMakingRequest"
type="button" type="button"
class="btn btn-sm btn-default js-remove-branch-button" class="btn btn-sm btn-default js-remove-branch-button"
@click="removeSourceBranch" @click="removeSourceBranch"
> >
{{ s__('mrWidget|Remove Source Branch') }} {{ s__('mrWidget|Delete source branch') }}
</button> </button>
</p> </p>
<p v-if="shouldShowSourceBranchRemoving"> <p v-if="shouldShowSourceBranchRemoving">
<gl-loading-icon :inline="true" /> <gl-loading-icon :inline="true" />
<span> {{ s__('mrWidget|The source branch is being removed') }} </span> <span> {{ s__('mrWidget|The source branch is being deleted') }} </span>
</p> </p>
</section> </section>
</div> </div>
......
...@@ -223,7 +223,7 @@ export default { ...@@ -223,7 +223,7 @@ export default {
} }
}) })
.catch(() => { .catch(() => {
new Flash('Something went wrong while removing the source branch. Please try again.'); // eslint-disable-line new Flash('Something went wrong while deleting the source branch. Please try again.'); // eslint-disable-line
}); });
}, },
}, },
...@@ -297,7 +297,7 @@ export default { ...@@ -297,7 +297,7 @@ export default {
class="js-remove-source-branch-checkbox" class="js-remove-source-branch-checkbox"
type="checkbox" type="checkbox"
/> />
Remove source branch Delete source branch
</label> </label>
<!-- Placeholder for EE extension of this component --> <!-- Placeholder for EE extension of this component -->
......
...@@ -14,7 +14,7 @@ class DeleteBranchService < BaseService ...@@ -14,7 +14,7 @@ class DeleteBranchService < BaseService
end end
if repository.rm_branch(current_user, branch_name) if repository.rm_branch(current_user, branch_name)
success('Branch was removed') success('Branch was deleted')
else else
error('Failed to remove branch') error('Failed to remove branch')
end end
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
= link_to(commit.short_id, namespace_project_commit_path(@project.namespace, @project, commit.id), class: 'commit-sha') = link_to(commit.short_id, namespace_project_commit_path(@project.namespace, @project, commit.id), class: 'commit-sha')
= time_ago_with_tooltip(commit.committed_date) = time_ago_with_tooltip(commit.committed_date)
- else - else
(branch was removed from repository) (branch was deleted from repository)
= yield = yield
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
= hidden_field_tag 'merge_request[force_remove_source_branch]', '0', id: nil = hidden_field_tag 'merge_request[force_remove_source_branch]', '0', id: nil
= check_box_tag 'merge_request[force_remove_source_branch]', '1', issuable.force_remove_source_branch?, class: 'form-check-input' = check_box_tag 'merge_request[force_remove_source_branch]', '1', issuable.force_remove_source_branch?, class: 'form-check-input'
= label_tag 'merge_request[force_remove_source_branch]', class: 'form-check-label' do = label_tag 'merge_request[force_remove_source_branch]', class: 'form-check-label' do
Remove source branch when merge request is accepted. Delete source branch when merge request is accepted.
.form-group.row .form-group.row
.col-sm-10.offset-sm-2 .col-sm-10.offset-sm-2
......
---
title: Use delete instead of remove when referring to `git branch -D`
merge_request: !23966
author:
type: changed
...@@ -179,7 +179,7 @@ module API ...@@ -179,7 +179,7 @@ module API
optional :assignee_id, type: Integer, desc: 'The ID of a user to assign the merge request' optional :assignee_id, type: Integer, desc: 'The ID of a user to assign the merge request'
optional :milestone_id, type: Integer, desc: 'The ID of a milestone to assign the merge request' optional :milestone_id, type: Integer, desc: 'The ID of a milestone to assign the merge request'
optional :labels, type: String, desc: 'Comma-separated list of label names' optional :labels, type: String, desc: 'Comma-separated list of label names'
optional :remove_source_branch, type: Boolean, desc: 'Remove source branch when merging' optional :remove_source_branch, type: Boolean, desc: 'Delete source branch when merging'
optional :allow_collaboration, type: Boolean, desc: 'Allow commits from members who can merge to the target branch' optional :allow_collaboration, type: Boolean, desc: 'Allow commits from members who can merge to the target branch'
optional :allow_maintainer_to_push, type: Boolean, as: :allow_collaboration, desc: '[deprecated] See allow_collaboration' optional :allow_maintainer_to_push, type: Boolean, as: :allow_collaboration, desc: '[deprecated] See allow_collaboration'
optional :squash, type: Grape::API::Boolean, desc: 'When true, the commits will be squashed into a single commit on merge' optional :squash, type: Grape::API::Boolean, desc: 'When true, the commits will be squashed into a single commit on merge'
......
...@@ -291,7 +291,7 @@ msgstr "" ...@@ -291,7 +291,7 @@ msgstr ""
msgid "<strong>%{group_name}</strong> group members" msgid "<strong>%{group_name}</strong> group members"
msgstr "" msgstr ""
msgid "<strong>Removes</strong> source branch" msgid "<strong>Deletes</strong> source branch"
msgstr "" msgstr ""
msgid "A 'Runner' is a process which runs a job. You can set up as many Runners as you need." msgid "A 'Runner' is a process which runs a job. You can set up as many Runners as you need."
...@@ -8334,6 +8334,9 @@ msgstr "" ...@@ -8334,6 +8334,9 @@ msgstr ""
msgid "mrWidget|Create an issue to resolve them later" msgid "mrWidget|Create an issue to resolve them later"
msgstr "" msgstr ""
msgid "mrWidget|Delete source branch"
msgstr ""
msgid "mrWidget|Deployment statistics are not available currently" msgid "mrWidget|Deployment statistics are not available currently"
msgstr "" msgstr ""
...@@ -8394,12 +8397,6 @@ msgstr "" ...@@ -8394,12 +8397,6 @@ msgstr ""
msgid "mrWidget|Refreshing now" msgid "mrWidget|Refreshing now"
msgstr "" msgstr ""
msgid "mrWidget|Remove Source Branch"
msgstr ""
msgid "mrWidget|Remove source branch"
msgstr ""
msgid "mrWidget|Request to merge" msgid "mrWidget|Request to merge"
msgstr "" msgstr ""
...@@ -8433,19 +8430,19 @@ msgstr "" ...@@ -8433,19 +8430,19 @@ msgstr ""
msgid "mrWidget|The source branch HEAD has recently changed. Please reload the page and review the changes before merging" msgid "mrWidget|The source branch HEAD has recently changed. Please reload the page and review the changes before merging"
msgstr "" msgstr ""
msgid "mrWidget|The source branch has been removed" msgid "mrWidget|The source branch has been deleted"
msgstr "" msgstr ""
msgid "mrWidget|The source branch is %{commitsBehindLinkStart}%{commitsBehind}%{commitsBehindLinkEnd} the target branch" msgid "mrWidget|The source branch is %{commitsBehindLinkStart}%{commitsBehind}%{commitsBehindLinkEnd} the target branch"
msgstr "" msgstr ""
msgid "mrWidget|The source branch is being removed" msgid "mrWidget|The source branch is being deleted"
msgstr "" msgstr ""
msgid "mrWidget|The source branch will be removed" msgid "mrWidget|The source branch will be deleted"
msgstr "" msgstr ""
msgid "mrWidget|The source branch will not be removed" msgid "mrWidget|The source branch will not be deleted"
msgstr "" msgstr ""
msgid "mrWidget|There are merge conflicts" msgid "mrWidget|There are merge conflicts"
...@@ -8469,10 +8466,10 @@ msgstr "" ...@@ -8469,10 +8466,10 @@ msgstr ""
msgid "mrWidget|You are not allowed to edit this project directly. Please fork to make changes." msgid "mrWidget|You are not allowed to edit this project directly. Please fork to make changes."
msgstr "" msgstr ""
msgid "mrWidget|You can merge this merge request manually using the" msgid "mrWidget|You can delete the source branch now"
msgstr "" msgstr ""
msgid "mrWidget|You can remove source branch now" msgid "mrWidget|You can merge this merge request manually using the"
msgstr "" msgstr ""
msgid "mrWidget|branch does not exist." msgid "mrWidget|branch does not exist."
......
...@@ -331,7 +331,7 @@ describe Projects::BranchesController do ...@@ -331,7 +331,7 @@ describe Projects::BranchesController do
let(:branch) { "feature" } let(:branch) { "feature" }
it 'returns JSON response with message' do it 'returns JSON response with message' do
expect(json_response).to eql("message" => 'Branch was removed') expect(json_response).to eql("message" => 'Branch was deleted')
end end
it { expect(response).to have_gitlab_http_status(200) } it { expect(response).to have_gitlab_http_status(200) }
...@@ -341,7 +341,7 @@ describe Projects::BranchesController do ...@@ -341,7 +341,7 @@ describe Projects::BranchesController do
let(:branch) { "improve/awesome" } let(:branch) { "improve/awesome" }
it 'returns JSON response with message' do it 'returns JSON response with message' do
expect(json_response).to eql('message' => 'Branch was removed') expect(json_response).to eql('message' => 'Branch was deleted')
end end
it { expect(response).to have_gitlab_http_status(200) } it { expect(response).to have_gitlab_http_status(200) }
...@@ -351,7 +351,7 @@ describe Projects::BranchesController do ...@@ -351,7 +351,7 @@ describe Projects::BranchesController do
let(:branch) { 'improve%2Fawesome' } let(:branch) { 'improve%2Fawesome' }
it 'returns JSON response with message' do it 'returns JSON response with message' do
expect(json_response).to eql('message' => 'Branch was removed') expect(json_response).to eql('message' => 'Branch was deleted')
end end
it { expect(response).to have_gitlab_http_status(200) } it { expect(response).to have_gitlab_http_status(200) }
......
...@@ -25,7 +25,7 @@ describe 'User accepts a merge request', :js do ...@@ -25,7 +25,7 @@ describe 'User accepts a merge request', :js do
end end
it 'accepts a merge request' do it 'accepts a merge request' do
check('Remove source branch') check('Delete source branch')
click_button('Merge') click_button('Merge')
expect(page).to have_content('The changes were merged into') expect(page).to have_content('The changes were merged into')
...@@ -60,7 +60,7 @@ describe 'User accepts a merge request', :js do ...@@ -60,7 +60,7 @@ describe 'User accepts a merge request', :js do
end end
it 'accepts a merge request' do it 'accepts a merge request' do
check('Remove source branch') check('Delete source branch')
click_button('Merge') click_button('Merge')
expect(page).to have_content('The changes were merged into') expect(page).to have_content('The changes were merged into')
......
...@@ -33,7 +33,7 @@ describe 'Merge request > User merges when pipeline succeeds', :js do ...@@ -33,7 +33,7 @@ describe 'Merge request > User merges when pipeline succeeds', :js do
click_button "Merge when pipeline succeeds" click_button "Merge when pipeline succeeds"
expect(page).to have_content "Set by #{user.name} to be merged automatically when the pipeline succeeds" expect(page).to have_content "Set by #{user.name} to be merged automatically when the pipeline succeeds"
expect(page).to have_content "The source branch will not be removed" expect(page).to have_content "The source branch will not be deleted"
expect(page).to have_selector ".js-cancel-auto-merge" expect(page).to have_selector ".js-cancel-auto-merge"
visit project_merge_request_path(project, merge_request) # Needed to refresh the page visit project_merge_request_path(project, merge_request) # Needed to refresh the page
expect(page).to have_content /enabled an automatic merge when the pipeline for \h{8} succeeds/i expect(page).to have_content /enabled an automatic merge when the pipeline for \h{8} succeeds/i
...@@ -94,7 +94,7 @@ describe 'Merge request > User merges when pipeline succeeds', :js do ...@@ -94,7 +94,7 @@ describe 'Merge request > User merges when pipeline succeeds', :js do
click_link 'Merge when pipeline succeeds' click_link 'Merge when pipeline succeeds'
expect(page).to have_content "Set by #{user.name} to be merged automatically when the pipeline succeeds" expect(page).to have_content "Set by #{user.name} to be merged automatically when the pipeline succeeds"
expect(page).to have_content "The source branch will not be removed" expect(page).to have_content "The source branch will not be deleted"
expect(page).to have_link "Cancel automatic merge" expect(page).to have_link "Cancel automatic merge"
end end
end end
...@@ -127,10 +127,10 @@ describe 'Merge request > User merges when pipeline succeeds', :js do ...@@ -127,10 +127,10 @@ describe 'Merge request > User merges when pipeline succeeds', :js do
expect(page).to have_content "canceled the automatic merge" expect(page).to have_content "canceled the automatic merge"
end end
it 'allows to remove source branch' do it 'allows to delete source branch' do
click_link "Remove source branch" click_link "Delete source branch"
expect(page).to have_content "The source branch will be removed" expect(page).to have_content "The source branch will be deleted"
end end
context 'when pipeline succeeds' do context 'when pipeline succeeds' do
......
...@@ -316,7 +316,7 @@ describe 'Merge request > User sees merge widget', :js do ...@@ -316,7 +316,7 @@ describe 'Merge request > User sees merge widget', :js do
it 'user cannot remove source branch' do it 'user cannot remove source branch' do
expect(page).not_to have_field('remove-source-branch-input') expect(page).not_to have_field('remove-source-branch-input')
expect(page).to have_content('Removes source branch') expect(page).to have_content('Deletes source branch')
end end
end end
......
...@@ -38,7 +38,7 @@ describe 'User squashes a merge request', :js do ...@@ -38,7 +38,7 @@ describe 'User squashes a merge request', :js do
def accept_mr def accept_mr
expect(page).to have_button('Merge') expect(page).to have_button('Merge')
uncheck 'Remove source branch' uncheck 'Delete source branch'
click_on 'Merge' click_on 'Merge'
end end
......
...@@ -97,7 +97,7 @@ describe 'Protected Branches', :js do ...@@ -97,7 +97,7 @@ describe 'Protected Branches', :js do
set_protected_branch_name('some-branch') set_protected_branch_name('some-branch')
click_on "Protect" click_on "Protect"
within(".protected-branches-list") { expect(page).to have_content('branch was removed') } within(".protected-branches-list") { expect(page).to have_content('branch was deleted') }
end end
end end
......
...@@ -121,14 +121,14 @@ describe('MRWidgetMergeWhenPipelineSucceeds', () => { ...@@ -121,14 +121,14 @@ describe('MRWidgetMergeWhenPipelineSucceeds', () => {
expect(vm.$el.innerText).toContain('to be merged automatically when the pipeline succeeds'); 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('The changes will be merged into');
expect(vm.$el.innerText).toContain(targetBranch); 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( expect(vm.$el.querySelector('.js-cancel-auto-merge').innerText).toContain(
'Cancel automatic merge', 'Cancel automatic merge',
); );
expect(vm.$el.querySelector('.js-cancel-auto-merge').getAttribute('disabled')).toBeFalsy(); expect(vm.$el.querySelector('.js-cancel-auto-merge').getAttribute('disabled')).toBeFalsy();
expect(vm.$el.querySelector('.js-remove-source-branch').innerText).toContain( 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(); expect(vm.$el.querySelector('.js-remove-source-branch').getAttribute('disabled')).toBeFalsy();
...@@ -143,19 +143,19 @@ describe('MRWidgetMergeWhenPipelineSucceeds', () => { ...@@ -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; vm.mr.shouldRemoveSourceBranch = true;
Vue.nextTick(() => { Vue.nextTick(() => {
const normalizedText = vm.$el.innerText.replace(/\s+/g, ' '); const normalizedText = vm.$el.innerText.replace(/\s+/g, ' ');
expect(normalizedText).toContain('The source branch will be removed'); expect(normalizedText).toContain('The source branch will be deleted');
expect(normalizedText).not.toContain('The source branch will not be removed'); expect(normalizedText).not.toContain('The source branch will not be deleted');
done(); 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; vm.mr.currentUserId = 4;
Vue.nextTick(() => { Vue.nextTick(() => {
...@@ -164,7 +164,7 @@ describe('MRWidgetMergeWhenPipelineSucceeds', () => { ...@@ -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; vm.isRemovingSourceBranch = true;
Vue.nextTick(() => { Vue.nextTick(() => {
......
...@@ -128,7 +128,7 @@ describe('MRWidgetMerged', () => { ...@@ -128,7 +128,7 @@ describe('MRWidgetMerged', () => {
new Promise(resolve => { new Promise(resolve => {
resolve({ resolve({
data: { data: {
message: 'Branch was removed', message: 'Branch was deleted',
}, },
}); });
}), }),
...@@ -157,8 +157,8 @@ describe('MRWidgetMerged', () => { ...@@ -157,8 +157,8 @@ describe('MRWidgetMerged', () => {
expect(vm.$el.textContent).toContain(targetBranch); expect(vm.$el.textContent).toContain(targetBranch);
}); });
it('renders information about branch being removed', () => { it('renders information about branch being deleted', () => {
expect(vm.$el.textContent).toContain('The source branch has been removed'); expect(vm.$el.textContent).toContain('The source branch has been deleted');
}); });
it('shows revert and cherry-pick buttons', () => { it('shows revert and cherry-pick buttons', () => {
...@@ -189,24 +189,24 @@ describe('MRWidgetMerged', () => { ...@@ -189,24 +189,24 @@ describe('MRWidgetMerged', () => {
expect(selectors.mergeCommitShaLink.href).toBe(vm.mr.mergeCommitPath); 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; vm.mr.sourceBranchRemoved = false;
Vue.nextTick(() => { Vue.nextTick(() => {
expect(vm.$el.innerText).toContain('You can remove source branch now'); expect(vm.$el.innerText).toContain('You can delete the source branch now');
expect(vm.$el.innerText).not.toContain('The source branch has been removed'); expect(vm.$el.innerText).not.toContain('The source branch has been deleted');
done(); done();
}); });
}); });
it('should show source branch removing text', done => { it('should show source branch deleting text', done => {
vm.mr.isRemovingSourceBranch = true; vm.mr.isRemovingSourceBranch = true;
vm.mr.sourceBranchRemoved = false; vm.mr.sourceBranchRemoved = false;
Vue.nextTick(() => { Vue.nextTick(() => {
expect(vm.$el.innerText).toContain('The source branch is being removed'); expect(vm.$el.innerText).toContain('The source branch is being deleted');
expect(vm.$el.innerText).not.toContain('You can remove source branch now'); expect(vm.$el.innerText).not.toContain('You can delete the source branch now');
expect(vm.$el.innerText).not.toContain('The source branch has been removed'); expect(vm.$el.innerText).not.toContain('The source branch has been deleted');
done(); done();
}); });
}); });
......
...@@ -453,7 +453,7 @@ describe('mrWidgetOptions', () => { ...@@ -453,7 +453,7 @@ describe('mrWidgetOptions', () => {
vm.$nextTick(() => { vm.$nextTick(() => {
const tooltip = vm.$el.querySelector('.fa-question-circle'); 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( expect(tooltip.getAttribute('data-original-title')).toBe(
'A user with write access to the source branch selected this option', 'A user with write access to the source branch selected this option',
); );
...@@ -468,8 +468,8 @@ describe('mrWidgetOptions', () => { ...@@ -468,8 +468,8 @@ describe('mrWidgetOptions', () => {
vm.mr.state = 'merged'; vm.mr.state = 'merged';
vm.$nextTick(() => { vm.$nextTick(() => {
expect(vm.$el.textContent).toContain('The source branch has been removed'); expect(vm.$el.textContent).toContain('The source branch has been deleted');
expect(vm.$el.textContent).not.toContain('Removes source branch'); expect(vm.$el.textContent).not.toContain('Deletes source branch');
done(); done();
}); });
......
...@@ -129,12 +129,12 @@ RSpec.shared_examples 'an editable merge request' do ...@@ -129,12 +129,12 @@ RSpec.shared_examples 'an editable merge request' do
expect(merge_request.merge_params['force_remove_source_branch']).to be_truthy expect(merge_request.merge_params['force_remove_source_branch']).to be_truthy
visit edit_project_merge_request_path(target_project, merge_request) visit edit_project_merge_request_path(target_project, merge_request)
uncheck 'Remove source branch when merge request is accepted' uncheck 'Delete source branch when merge request is accepted'
click_button 'Save changes' click_button 'Save changes'
expect(page).to have_unchecked_field 'remove-source-branch-input' expect(page).to have_unchecked_field 'remove-source-branch-input'
expect(page).to have_content 'Remove source branch' expect(page).to have_content 'Delete source branch'
end end
end 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