Commit 4badf6ba23b7e9e7b75d04be46d4bb4c45d0a455
1 parent
87ca56c5
Exists in
master
and in
29 other branches
comment-reply-feature: add reply title and fix test
Showing
2 changed files
with
10 additions
and
9 deletions
Show diff stats
app/views/comment/_comment_actions.rhtml
| @@ -12,7 +12,8 @@ | @@ -12,7 +12,8 @@ | ||
| 12 | <%= link_to_function '', | 12 | <%= link_to_function '', |
| 13 | "var f = add_comment_reply_form(this, %s); f.find('comment_title, textarea').val(''); return false" % comment.id, | 13 | "var f = add_comment_reply_form(this, %s); f.find('comment_title, textarea').val(''); return false" % comment.id, |
| 14 | :class => 'comment-footer comment-footer-link comment-footer-hide comment-actions-reply button', | 14 | :class => 'comment-footer comment-footer-link comment-footer-hide comment-actions-reply button', |
| 15 | - :id => 'comment-reply-to-' + comment.id.to_s | 15 | + :id => 'comment-reply-to-' + comment.id.to_s, |
| 16 | + :title => _('Reply') | ||
| 16 | %> | 17 | %> |
| 17 | <% end %> | 18 | <% end %> |
| 18 | <% links_action_bar.collect do |link| %> | 19 | <% links_action_bar.collect do |link| %> |
features/comment_reply.feature
| @@ -23,7 +23,7 @@ Feature: comment | @@ -23,7 +23,7 @@ Feature: comment | ||
| 23 | Scenario: show error messages when make a blank comment reply | 23 | Scenario: show error messages when make a blank comment reply |
| 24 | Given I am logged in as "booking" | 24 | Given I am logged in as "booking" |
| 25 | And I go to /booking/article-to-comment | 25 | And I go to /booking/article-to-comment |
| 26 | - And I follow "Reply" within ".comment-balloon" | 26 | + And I follow "Reply" within ".comments-action-bar" |
| 27 | When I press "Post comment" within ".comment-balloon" | 27 | When I press "Post comment" within ".comment-balloon" |
| 28 | Then I should see "Title can't be blank" within "div.comment_reply" | 28 | Then I should see "Title can't be blank" within "div.comment_reply" |
| 29 | And I should see "Body can't be blank" within "div.comment_reply" | 29 | And I should see "Body can't be blank" within "div.comment_reply" |
| @@ -31,30 +31,30 @@ Feature: comment | @@ -31,30 +31,30 @@ Feature: comment | ||
| 31 | @selenium | 31 | @selenium |
| 32 | Scenario: render reply form | 32 | Scenario: render reply form |
| 33 | Given I am on /booking/article-to-comment | 33 | Given I am on /booking/article-to-comment |
| 34 | - When I follow "Reply" within ".comment-balloon" | 34 | + When I follow "Reply" within ".comments-action-bar" |
| 35 | Then I should see "Enter your comment" within "div.comment_reply.opened" | 35 | Then I should see "Enter your comment" within "div.comment_reply.opened" |
| 36 | 36 | ||
| 37 | # The text is hidden but the detector gets it anyway | 37 | # The text is hidden but the detector gets it anyway |
| 38 | @selenium-fixme | 38 | @selenium-fixme |
| 39 | Scenario: cancel comment reply | 39 | Scenario: cancel comment reply |
| 40 | Given I am on /booking/article-to-comment | 40 | Given I am on /booking/article-to-comment |
| 41 | - When I follow "Reply" within ".comment-balloon" | ||
| 42 | - And I follow "Cancel" within ".comment-balloon" | 41 | + And I follow "Reply" within ".comments-action-bar" |
| 42 | + When I follow "Cancel" within ".comment-balloon" | ||
| 43 | Then I should not see "Enter your comment" within "div.comment_reply.closed" | 43 | Then I should not see "Enter your comment" within "div.comment_reply.closed" |
| 44 | 44 | ||
| 45 | @selenium-fixme | 45 | @selenium-fixme |
| 46 | Scenario: not render same reply form twice | 46 | Scenario: not render same reply form twice |
| 47 | Given I am on /booking/article-to-comment | 47 | Given I am on /booking/article-to-comment |
| 48 | - When I follow "Reply" within ".comment-balloon" | 48 | + And I follow "Reply" within ".comments-action-bar" |
| 49 | And I follow "Cancel" within ".comment-balloon" | 49 | And I follow "Cancel" within ".comment-balloon" |
| 50 | - And I follow "Reply" within ".comment-balloon" | 50 | + When I follow "Reply" within ".comments-action-bar" |
| 51 | Then there should be 1 "comment_form" within "comment_reply" | 51 | Then there should be 1 "comment_form" within "comment_reply" |
| 52 | And I should see "Enter your comment" within "div.comment_reply.opened" | 52 | And I should see "Enter your comment" within "div.comment_reply.opened" |
| 53 | 53 | ||
| 54 | @selenium-fixme | 54 | @selenium-fixme |
| 55 | Scenario: reply a comment | 55 | Scenario: reply a comment |
| 56 | Given I go to /booking/another-article | 56 | Given I go to /booking/another-article |
| 57 | - And I follow "Reply" within ".comment-balloon" | 57 | + And I follow "Reply" within ".comments-action-bar" |
| 58 | And I fill in "Name" within "comment-balloon" with "Joey" | 58 | And I fill in "Name" within "comment-balloon" with "Joey" |
| 59 | And I fill in "e-mail" within "comment-balloon" with "joey@ramones.com" | 59 | And I fill in "e-mail" within "comment-balloon" with "joey@ramones.com" |
| 60 | And I fill in "Title" within "comment-balloon" with "Hey ho, let's go!" | 60 | And I fill in "Title" within "comment-balloon" with "Hey ho, let's go!" |
| @@ -73,7 +73,7 @@ Feature: comment | @@ -73,7 +73,7 @@ Feature: comment | ||
| 73 | | rails.png | booking | root comment | this comment is not a reply | | 73 | | rails.png | booking | root comment | this comment is not a reply | |
| 74 | Given I am logged in as "booking" | 74 | Given I am logged in as "booking" |
| 75 | And I go to /booking/rails.png?view=true | 75 | And I go to /booking/rails.png?view=true |
| 76 | - And I follow "Reply" within ".comment-balloon" | 76 | + And I follow "Reply" within ".comments-action-bar" |
| 77 | And I fill in "Title" within "comment-balloon" with "Hey ho, let's go!" | 77 | And I fill in "Title" within "comment-balloon" with "Hey ho, let's go!" |
| 78 | And I fill in "Enter your comment" within "comment-balloon" with "Hey ho, let's go!" | 78 | And I fill in "Enter your comment" within "comment-balloon" with "Hey ho, let's go!" |
| 79 | When I press "Post comment" within ".comment-balloon" | 79 | When I press "Post comment" within ".comment-balloon" |