Commit 890b9f3a2dd90d68009943d9067ee7f76b4590f4

Authored by Dmitriy Zaporozhets
1 parent c3bbbff6

Fix MR comment tests

features/steps/project/project_merge_requests.rb
@@ -116,29 +116,21 @@ class ProjectMergeRequests < Spinach::FeatureSteps @@ -116,29 +116,21 @@ class ProjectMergeRequests < Spinach::FeatureSteps
116 end 116 end
117 117
118 Then 'I should see a discussion has started on line 185' do 118 Then 'I should see a discussion has started on line 185' do
119 - first_commit = merge_request.commits.first  
120 - first_diff = first_commit.diffs.first  
121 page.should have_content "#{current_user.name} started a discussion on this merge request diff" 119 page.should have_content "#{current_user.name} started a discussion on this merge request diff"
122 - page.should have_content "#{first_diff.b_path}:L185" 120 + page.should have_content "app/assets/stylesheets/tree.scss:L185"
123 page.should have_content "Line is wrong" 121 page.should have_content "Line is wrong"
124 end 122 end
125 123
126 Then 'I should see a discussion has started on commit bcf03b5de6c:L185' do 124 Then 'I should see a discussion has started on commit bcf03b5de6c:L185' do
127 - first_commit = merge_request.commits.first  
128 - first_diff = first_commit.diffs.first  
129 page.should have_content "#{current_user.name} started a discussion on commit" 125 page.should have_content "#{current_user.name} started a discussion on commit"
130 - page.should have_content first_commit.short_id(8)  
131 - page.should have_content "#{first_diff.b_path}:L185" 126 + page.should have_content "app/assets/stylesheets/tree.scss:L185"
132 page.should have_content "Line is wrong" 127 page.should have_content "Line is wrong"
133 end 128 end
134 129
135 Then 'I should see a discussion has started on commit bcf03b5de6c' do 130 Then 'I should see a discussion has started on commit bcf03b5de6c' do
136 - first_commit = merge_request.st_commits.first  
137 - first_diff = first_commit.diffs.first  
138 page.should have_content "#{current_user.name} started a discussion on commit bcf03b5de6c" 131 page.should have_content "#{current_user.name} started a discussion on commit bcf03b5de6c"
139 - page.should have_content first_commit.short_id(8)  
140 page.should have_content "One comment to rule them all" 132 page.should have_content "One comment to rule them all"
141 - page.should have_content "#{first_diff.b_path}:L185" 133 + page.should have_content "app/assets/stylesheets/tree.scss:L185"
142 end 134 end
143 135
144 def project 136 def project