Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2017-05-26 22:42:02 +0300
committerTimothy Andrew <mail@timothyandrew.net>2017-06-08 13:28:17 +0300
commit65144f701c137a07f686e228a375121cd1fc0061 (patch)
tree047841a2e4ea8c1e10cb199646dc16f207d186ca /features
parent47420a2d6222b36bb58599b181075e2a356665ea (diff)
Merge branch '32447-remove-source-branch-is-displayed-to-mergers-who-cannot-actually-delete-the-source-branch-from-a-forked-project' into 'master'
Disable "Remove source branch" in MR Widget for users who can't remove, and re-add checkbox to MR form Closes #32447 and #32907 See merge request !11558
Diffstat (limited to 'features')
-rw-r--r--features/project/merge_requests/accept.feature3
-rw-r--r--features/steps/project/merge_requests/acceptance.rb6
2 files changed, 7 insertions, 2 deletions
diff --git a/features/project/merge_requests/accept.feature b/features/project/merge_requests/accept.feature
index c45ed9ea68b..2ab1c19f452 100644
--- a/features/project/merge_requests/accept.feature
+++ b/features/project/merge_requests/accept.feature
@@ -7,6 +7,7 @@ Feature: Project Merge Requests Acceptance
@javascript
Scenario: Accepting the Merge Request and removing the source branch
Given I am on the Merge Request detail page
+ When I check the "Remove source branch" option
And I click on Accept Merge Request
Then I should see merge request merged
And I should not see the Remove Source Branch button
@@ -14,6 +15,7 @@ Feature: Project Merge Requests Acceptance
@javascript
Scenario: Accepting the Merge Request when URL has an anchor
Given I am on the Merge Request detail with note anchor page
+ When I check the "Remove source branch" option
And I click on Accept Merge Request
Then I should see merge request merged
And I should not see the Remove Source Branch button
@@ -21,7 +23,6 @@ Feature: Project Merge Requests Acceptance
@javascript
Scenario: Accepting the Merge Request without removing the source branch
Given I am on the Merge Request detail page
- When I click on "Remove source branch" option
When I click on Accept Merge Request
Then I should see merge request merged
And I should see the Remove Source Branch button
diff --git a/features/steps/project/merge_requests/acceptance.rb b/features/steps/project/merge_requests/acceptance.rb
index 3c976f675a2..cdaa849308c 100644
--- a/features/steps/project/merge_requests/acceptance.rb
+++ b/features/steps/project/merge_requests/acceptance.rb
@@ -11,10 +11,14 @@ class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps
visit merge_request_path(@merge_request, anchor: 'note_123')
end
- step 'I click on "Remove source branch" option' do
+ step 'I uncheck the "Remove source branch" option' do
uncheck('Remove source branch')
end
+ step 'I check the "Remove source branch" option' do
+ check('Remove source branch')
+ end
+
step 'I click on Accept Merge Request' do
click_button('Merge')
end