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 | 12 | <%= link_to_function '', |
13 | 13 | "var f = add_comment_reply_form(this, %s); f.find('comment_title, textarea').val(''); return false" % comment.id, |
14 | 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 | 18 | <% end %> |
18 | 19 | <% links_action_bar.collect do |link| %> | ... | ... |
features/comment_reply.feature
... | ... | @@ -23,7 +23,7 @@ Feature: comment |
23 | 23 | Scenario: show error messages when make a blank comment reply |
24 | 24 | Given I am logged in as "booking" |
25 | 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 | 27 | When I press "Post comment" within ".comment-balloon" |
28 | 28 | Then I should see "Title can't be blank" within "div.comment_reply" |
29 | 29 | And I should see "Body can't be blank" within "div.comment_reply" |
... | ... | @@ -31,30 +31,30 @@ Feature: comment |
31 | 31 | @selenium |
32 | 32 | Scenario: render reply form |
33 | 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 | 35 | Then I should see "Enter your comment" within "div.comment_reply.opened" |
36 | 36 | |
37 | 37 | # The text is hidden but the detector gets it anyway |
38 | 38 | @selenium-fixme |
39 | 39 | Scenario: cancel comment reply |
40 | 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 | 43 | Then I should not see "Enter your comment" within "div.comment_reply.closed" |
44 | 44 | |
45 | 45 | @selenium-fixme |
46 | 46 | Scenario: not render same reply form twice |
47 | 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 | 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 | 51 | Then there should be 1 "comment_form" within "comment_reply" |
52 | 52 | And I should see "Enter your comment" within "div.comment_reply.opened" |
53 | 53 | |
54 | 54 | @selenium-fixme |
55 | 55 | Scenario: reply a comment |
56 | 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 | 58 | And I fill in "Name" within "comment-balloon" with "Joey" |
59 | 59 | And I fill in "e-mail" within "comment-balloon" with "joey@ramones.com" |
60 | 60 | And I fill in "Title" within "comment-balloon" with "Hey ho, let's go!" |
... | ... | @@ -73,7 +73,7 @@ Feature: comment |
73 | 73 | | rails.png | booking | root comment | this comment is not a reply | |
74 | 74 | Given I am logged in as "booking" |
75 | 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 | 77 | And I fill in "Title" within "comment-balloon" with "Hey ho, let's go!" |
78 | 78 | And I fill in "Enter your comment" within "comment-balloon" with "Hey ho, let's go!" |
79 | 79 | When I press "Post comment" within ".comment-balloon" | ... | ... |