summaryrefslogtreecommitdiff
path: root/features
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
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')
-rw-r--r--features/project/commits/comments.feature6
-rw-r--r--features/project/issues/issues.feature9
-rw-r--r--features/steps/shared/note.rb17
3 files changed, 32 insertions, 0 deletions
diff --git a/features/project/commits/comments.feature b/features/project/commits/comments.feature
index afcf0fdbb07..c41075d7ad4 100644
--- a/features/project/commits/comments.feature
+++ b/features/project/commits/comments.feature
@@ -41,3 +41,9 @@ Feature: Project Commits Comments
Given I leave a comment like "XML attached"
And I delete a comment
Then I should not see a comment saying "XML attached"
+
+ @javascript
+ Scenario: I can edit a comment with +1
+ Given I leave a comment like "XML attached"
+ And I edit the last comment with a +1
+ Then I should see +1 in the description
diff --git a/features/project/issues/issues.feature b/features/project/issues/issues.feature
index 28ea44530fe..283979204db 100644
--- a/features/project/issues/issues.feature
+++ b/features/project/issues/issues.feature
@@ -139,6 +139,15 @@ Feature: Project Issues
And I leave a comment with task markdown
Then I should not see task checkboxes in the comment
+ @javascript
+ Scenario: Issue notes should be editable with +1
+ Given project "Shop" has "Tasks-open" open issue with task markdown
+ When I visit issue page "Tasks-open"
+ And I leave a comment with a header containing "Comment with a header"
+ Then The comment with the header should not have an ID
+ And I edit the last comment with a +1
+ Then I should see +1 in the description
+
# Task status in issues list
Scenario: Issues list should display task status
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