Commit 92b3612025d233b174e0caa3532604d4ee48d1ab
1 parent
584117aa
Exists in
master
and in
4 other branches
Improve project_merge_requests.rb feature steps
Showing
1 changed file
with
13 additions
and
7 deletions
Show diff stats
features/steps/project/project_merge_requests.rb
@@ -21,7 +21,9 @@ class ProjectMergeRequests < Spinach::FeatureSteps | @@ -21,7 +21,9 @@ class ProjectMergeRequests < Spinach::FeatureSteps | ||
21 | end | 21 | end |
22 | 22 | ||
23 | Then 'I should see merge request "Wiki Feature"' do | 23 | Then 'I should see merge request "Wiki Feature"' do |
24 | - page.should have_content "Wiki Feature" | 24 | + within '.merge-request' do |
25 | + page.should have_content "Wiki Feature" | ||
26 | + end | ||
25 | end | 27 | end |
26 | 28 | ||
27 | Then 'I should see closed merge request "Bug NS-04"' do | 29 | Then 'I should see closed merge request "Bug NS-04"' do |
@@ -56,16 +58,20 @@ class ProjectMergeRequests < Spinach::FeatureSteps | @@ -56,16 +58,20 @@ class ProjectMergeRequests < Spinach::FeatureSteps | ||
56 | end | 58 | end |
57 | 59 | ||
58 | And 'I submit new merge request "Wiki Feature"' do | 60 | And 'I submit new merge request "Wiki Feature"' do |
59 | - #this must come first, so that the target branch is set by the time the "select" for "notes_refactoring" is executed | ||
60 | - select project.path_with_namespace, :from => "merge_request_target_project_id" | ||
61 | - fill_in "merge_request_title", :with => "Wiki Feature" | ||
62 | - select "master", :from => "merge_request_source_branch" | 61 | + fill_in "merge_request_title", with: "Wiki Feature" |
62 | + | ||
63 | + # this must come first, so that the target branch is set | ||
64 | + # by the time the "select" for "notes_refactoring" is executed | ||
65 | + select project.path_with_namespace, from: "merge_request_target_project_id" | ||
66 | + select "master", from: "merge_request_source_branch" | ||
67 | + | ||
63 | find(:select, "merge_request_target_project_id", {}).value.should == project.id.to_s | 68 | find(:select, "merge_request_target_project_id", {}).value.should == project.id.to_s |
64 | find(:select, "merge_request_source_project_id", {}).value.should == project.id.to_s | 69 | find(:select, "merge_request_source_project_id", {}).value.should == project.id.to_s |
65 | 70 | ||
66 | - #using "notes_refactoring" because "Bug NS-04" uses master/stable, this will fail merge_request validation if the branches are the same | 71 | + # using "notes_refactoring" because "Bug NS-04" uses master/stable, |
72 | + # this will fail merge_request validation if the branches are the same | ||
67 | find(:select, "merge_request_target_branch", {}).find(:option, "notes_refactoring", {}).value.should == "notes_refactoring" | 73 | find(:select, "merge_request_target_branch", {}).find(:option, "notes_refactoring", {}).value.should == "notes_refactoring" |
68 | - select "notes_refactoring", :from => "merge_request_target_branch" | 74 | + select "notes_refactoring", from: "merge_request_target_branch" |
69 | 75 | ||
70 | click_button "Submit merge request" | 76 | click_button "Submit merge request" |
71 | end | 77 | end |