Improve project_merge_requests.rb feature steps
This commit is contained in:
parent
584117aa87
commit
92b3612025
1 changed files with 13 additions and 7 deletions
|
@ -21,7 +21,9 @@ class ProjectMergeRequests < Spinach::FeatureSteps
|
|||
end
|
||||
|
||||
Then 'I should see merge request "Wiki Feature"' do
|
||||
page.should have_content "Wiki Feature"
|
||||
within '.merge-request' do
|
||||
page.should have_content "Wiki Feature"
|
||||
end
|
||||
end
|
||||
|
||||
Then 'I should see closed merge request "Bug NS-04"' do
|
||||
|
@ -56,16 +58,20 @@ class ProjectMergeRequests < Spinach::FeatureSteps
|
|||
end
|
||||
|
||||
And 'I submit new merge request "Wiki Feature"' do
|
||||
#this must come first, so that the target branch is set by the time the "select" for "notes_refactoring" is executed
|
||||
select project.path_with_namespace, :from => "merge_request_target_project_id"
|
||||
fill_in "merge_request_title", :with => "Wiki Feature"
|
||||
select "master", :from => "merge_request_source_branch"
|
||||
fill_in "merge_request_title", with: "Wiki Feature"
|
||||
|
||||
# this must come first, so that the target branch is set
|
||||
# by the time the "select" for "notes_refactoring" is executed
|
||||
select project.path_with_namespace, from: "merge_request_target_project_id"
|
||||
select "master", from: "merge_request_source_branch"
|
||||
|
||||
find(:select, "merge_request_target_project_id", {}).value.should == project.id.to_s
|
||||
find(:select, "merge_request_source_project_id", {}).value.should == project.id.to_s
|
||||
|
||||
#using "notes_refactoring" because "Bug NS-04" uses master/stable, this will fail merge_request validation if the branches are the same
|
||||
# using "notes_refactoring" because "Bug NS-04" uses master/stable,
|
||||
# this will fail merge_request validation if the branches are the same
|
||||
find(:select, "merge_request_target_branch", {}).find(:option, "notes_refactoring", {}).value.should == "notes_refactoring"
|
||||
select "notes_refactoring", :from => "merge_request_target_branch"
|
||||
select "notes_refactoring", from: "merge_request_target_branch"
|
||||
|
||||
click_button "Submit merge request"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue