diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-12-24 14:41:36 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-12-24 14:41:36 +0300 |
commit | 541da4d51f3e8abfccbbfc7301d8c133fd0fcd35 (patch) | |
tree | d62d10139cee507a3af7e1654a9f4785e4c8c334 /features | |
parent | e622259d5be95ede9b4f52b0e654cdf0a7a4323f (diff) | |
parent | 42da7cd375a615d0ba092495981682bafdb99b47 (diff) |
Merge branch 'issue_4189' into 'master'
Fix redirect to wrong URL when merging and MR detail URL has an anchor.
Closes #4189
See merge request !2169
Diffstat (limited to 'features')
-rw-r--r-- | features/project/merge_requests/accept.feature | 8 | ||||
-rw-r--r-- | features/steps/project/merge_requests/acceptance.rb | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/features/project/merge_requests/accept.feature b/features/project/merge_requests/accept.feature index d5e4f2b0bd8..330ec8ae0fe 100644 --- a/features/project/merge_requests/accept.feature +++ b/features/project/merge_requests/accept.feature @@ -13,6 +13,14 @@ Feature: Project Merge Requests Acceptance And I should not see the Remove Source Branch button @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 click on "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 + + @javascript Scenario: Accepting the Merge Request without removing the source branch Given I am on the Merge Request detail page When I click on Accept Merge Request diff --git a/features/steps/project/merge_requests/acceptance.rb b/features/steps/project/merge_requests/acceptance.rb index 383c055c4ef..2685f5fd6b4 100644 --- a/features/steps/project/merge_requests/acceptance.rb +++ b/features/steps/project/merge_requests/acceptance.rb @@ -6,6 +6,10 @@ class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps visit merge_request_path(@merge_request) end + step 'I am on the Merge Request detail with note anchor page' do + visit merge_request_path(@merge_request, anchor: 'note_123') + end + step 'I click on "Remove source branch" option' do check('Remove source branch') end |