diff options
author | Jacob Carlborg <jacob.carlborg@tretti.se> | 2013-11-28 12:45:35 +0400 |
---|---|---|
committer | Jacob Carlborg <doob@me.com> | 2014-02-25 01:06:25 +0400 |
commit | 9439cb55260185b4a456982613f657f3c1b11915 (patch) | |
tree | cff49cb624021d9508b7dc390ad0573e46225c21 /features | |
parent | 504777ec20f006fd92cc948c03d35df3e1df4d3b (diff) |
By default, target original repository if fork when creating new MR.
Diffstat (limited to 'features')
-rw-r--r-- | features/project/forked_merge_requests.feature | 6 | ||||
-rw-r--r-- | features/steps/project/project_forked_merge_requests.rb | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/features/project/forked_merge_requests.feature b/features/project/forked_merge_requests.feature index 966905645a2..2d94b98c90b 100644 --- a/features/project/forked_merge_requests.feature +++ b/features/project/forked_merge_requests.feature @@ -32,3 +32,9 @@ Feature: Project Forked Merge Requests And I fill out an invalid "Merge Request On Forked Project" merge request And I submit the merge request Then I should see validation errors + + @javascript + Scenario: Merge request should target fork repository by default + Given I visit project "Forked Shop" merge requests page + And I click link "New Merge Request" + Then the target repository should be the original repository
\ No newline at end of file diff --git a/features/steps/project/project_forked_merge_requests.rb b/features/steps/project/project_forked_merge_requests.rb index 4cc99f8af55..df69cb75437 100644 --- a/features/steps/project/project_forked_merge_requests.rb +++ b/features/steps/project/project_forked_merge_requests.rb @@ -159,8 +159,11 @@ class ProjectForkedMergeRequests < Spinach::FeatureSteps step 'I fill out an invalid "Merge Request On Forked Project" merge request' do #If this isn't filled in the rest of the validations won't be triggered fill_in "merge_request_title", with: "Merge Request On Forked Project" + + select "Select branch", from: "merge_request_target_branch" + find(:select, "merge_request_source_project_id", {}).value.should == @forked_project.id.to_s - find(:select, "merge_request_target_project_id", {}).value.should == @forked_project.id.to_s + find(:select, "merge_request_target_project_id", {}).value.should == project.id.to_s find(:select, "merge_request_source_branch", {}).value.should == "" find(:select, "merge_request_target_branch", {}).value.should == "" end @@ -168,7 +171,10 @@ class ProjectForkedMergeRequests < Spinach::FeatureSteps step 'I should see validation errors' do page.should have_content "Source branch can't be blank" page.should have_content "Target branch can't be blank" - page.should have_content "Branch conflict You can not use same project/branch for source and target" + end + + step 'the target repository should be the original repository' do + page.should have_select("merge_request_target_project_id", selected: project.path_with_namespace) end def project |