Skip to content
Snippets Groups Projects
Commit d603709f authored by Valery Sizov's avatar Valery Sizov
Browse files

Remove source branch checkbox is missing from merge request page if setting is active

parent 0528ac63
No related branches found
No related tags found
No related merge requests found
- if can_remove_branch?(@merge_request.source_project, @merge_request.source_branch) && !@merge_request.for_fork?
.accept-control.checkbox
= label_tag :should_remove_source_branch, class: "remove_source_checkbox" do
= check_box_tag :should_remove_source_branch
Remove source branch
\ No newline at end of file
Loading
Loading
@@ -4,11 +4,7 @@
.accept-action
= f.button class: "btn btn-create accept_merge_request" do
Accept Merge Request
- if can_remove_branch?(@merge_request.source_project, @merge_request.source_branch) && !@merge_request.for_fork?
.accept-control.checkbox
= label_tag :should_remove_source_branch, class: "remove_source_checkbox" do
= check_box_tag :should_remove_source_branch
Remove source branch
= render "projects/merge_requests/remove_source_branch"
.accept-control.right
= link_to "#", class: "modify-merge-commit-link js-toggle-button" do
= icon('edit')
Loading
Loading
Loading
Loading
@@ -8,6 +8,7 @@
 
.accept-control
Fast-forward merge without creating merge commit
= render "projects/merge_requests/remove_source_branch"
- else
= form_for [:rebase, @project.namespace.becomes(Namespace), @project, @merge_request],
remote: false, method: :post, html: { class: 'accept-mr-form js-requires-input' } do |f|
Loading
Loading
Loading
Loading
@@ -10,6 +10,7 @@ Feature: Project Ff Merge Requests
Given merge request "Bug NS-05" is rebased
When I visit merge request page "Bug NS-05"
Then I should see ff-only merge button
And I should see remove source branch checkbox
 
Scenario: I do rebase before ff-only merge
Given rebase before merge enabled
Loading
Loading
Loading
Loading
@@ -55,6 +55,10 @@ class Spinach::Features::ProjectFfMergeRequests < Spinach::FeatureSteps
expect(page).to have_button "Rebase"
end
 
step 'I should see remove source branch checkbox' do
expect(page).to have_field "Remove source branch"
end
step 'I should see rebase message' do
expect(page).to have_content "Fast-forward merge is not possible. Branch must be rebased first"
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment