summaryrefslogtreecommitdiff
path: root/features/steps/shared/note.rb
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-03-02 15:05:23 -0800
committerStan Hu <stanhu@gmail.com>2015-03-02 15:26:00 -0800
commitb8c9257fb1dc70cd65a14cb7dec62455ea54e394 (patch)
tree00c98ff78e7629240c9fa512325ecb0ad1845180 /features/steps/shared/note.rb
parentf84bd771d4daa5753ad6a4b7e1a0c3cc9f51d33f (diff)
downloadgitlab-ce-b8c9257fb1dc70cd65a14cb7dec62455ea54e394.tar.gz
Fix bug where editing a comment with "+1" or "-1" would cause a server error
Closes #1151
Diffstat (limited to 'features/steps/shared/note.rb')
-rw-r--r--features/steps/shared/note.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/features/steps/shared/note.rb b/features/steps/shared/note.rb
index 45773056953..583746d4475 100644
--- a/features/steps/shared/note.rb
+++ b/features/steps/shared/note.rb
@@ -135,4 +135,21 @@ module SharedNote
'li.note div.timeline-content input[type="checkbox"]'
)
end
+
+ step 'I edit the last comment with a +1' do
+ find(".note").hover
+ find('.js-note-edit').click
+
+ within(".current-note-edit-form") do
+ fill_in 'note[note]', with: '+1 Awesome!'
+ click_button 'Save Comment'
+ sleep 0.05
+ end
+ end
+
+ step 'I should see +1 in the description' do
+ within(".note") do
+ page.should have_content("+1 Awesome!")
+ end
+ end
end