diff --git a/app/views/comment/_comment.rhtml b/app/views/comment/_comment.rhtml index 507a177..e7fb23b 100644 --- a/app/views/comment/_comment.rhtml +++ b/app/views/comment/_comment.rhtml @@ -41,7 +41,8 @@ <%= link_to_function '', "var f = add_comment_reply_form(this, %s); f.find('comment_title, textarea').val(''); return false" % comment.id, :class => 'comment-footer comment-footer-link comment-footer-hide comment-actions-reply button', - :id => 'comment-reply-to-' + comment.id.to_s + :id => 'comment-reply-to-' + comment.id.to_s, + :title => _('Reply') %> <% end %> diff --git a/features/comment.feature b/features/comment.feature index 9420391..3862d76 100644 --- a/features/comment.feature +++ b/features/comment.feature @@ -17,14 +17,6 @@ Feature: comment And feature "captcha_for_logged_users" is disabled on environment And I am logged in as "booking" - Scenario: not post a comment without javascript - Given I am on /booking/article-to-comment - And I follow "Post a comment" - And I fill in "Title" with "Hey ho, let's go!" - And I fill in "Enter your comment" with "Hey ho, let's go!" - When I press "Post comment" - Then I should not see "Hey ho, let's go" - # This test requires some way to overcome the captcha with unauthenticated # user. @selenium-fixme @@ -79,14 +71,14 @@ Feature: comment @selenium Scenario: render comment form and go to bottom - Given I am on /booking/article-with-comment + Given I am on /booking/article-to-comment When I follow "Post a comment" Then I should see "Enter your comment" - And I should be on /booking/article-with-comment + And I should be on /booking/article-to-comment @selenium Scenario: keep comments field filled while trying to do a comment - Given I am on /booking/article-with-comment + Given I am on /booking/article-to-comment And I follow "Post a comment" And I fill in "Title" with "Joey Ramone" When I press "Post comment" diff --git a/features/comment_reply.feature b/features/comment_reply.feature index bb2cdfa..5d7093c 100644 --- a/features/comment_reply.feature +++ b/features/comment_reply.feature @@ -15,15 +15,9 @@ Feature: comment | article to comment | booking | root comment | this comment is not a reply | | another article | booking | some comment | this is my very own comment | - Scenario: not post a comment without javascript - Given I am on /booking/article-to-comment - When I follow "Reply" within ".comment-balloon" - Then I should not see "Enter your comment" within "div.comment-balloon" - Scenario: not show any reply form by default When I go to /booking/article-to-comment Then I should not see "Enter your comment" within "div.comment-balloon" - And I should see "Reply" within "div.comment-balloon" @selenium-fixme Scenario: show error messages when make a blank comment reply @@ -35,18 +29,13 @@ Feature: comment And I should see "Body can't be blank" within "div.comment_reply" @selenium - Scenario: not show any reply form by default - When I go to /booking/article-to-comment - Then I should not see "Enter your comment" within "div.comment-balloon" - And I should see "Reply" within "div.comment-balloon" - - @selenium Scenario: render reply form Given I am on /booking/article-to-comment When I follow "Reply" within ".comment-balloon" Then I should see "Enter your comment" within "div.comment_reply.opened" - @selenium + # The text is hidden but the detector gets it anyway + @selenium-fixme Scenario: cancel comment reply Given I am on /booking/article-to-comment When I follow "Reply" within ".comment-balloon" diff --git a/test/functional/search_controller_test.rb b/test/functional/search_controller_test.rb index bb0bc17..17a42d8 100644 --- a/test/functional/search_controller_test.rb +++ b/test/functional/search_controller_test.rb @@ -286,7 +286,7 @@ class SearchControllerTest < ActionController::TestCase get :index, :query => 'test' [:articles, :enterprises, :people, :communities, :products, :events].select do |key, name| - !@controller.environment.enabled?('disable_asset_' + key.to_s) + !assigns(:environment).enabled?('disable_asset_' + key.to_s) end.each do |asset| assert !assigns(:searches)[asset][:results].empty? end diff --git a/test/integration/manage_documents_test.rb b/test/integration/manage_documents_test.rb index e561596..65ca224 100644 --- a/test/integration/manage_documents_test.rb +++ b/test/integration/manage_documents_test.rb @@ -88,7 +88,7 @@ class ManageDocumentsTest < ActionController::IntegrationTest assert_response :redirect follow_redirect! - assert_equal "/myprofile/myuser/cms", path + assert_equal "/myuser", path # the article was actually deleted assert_raise ActiveRecord::RecordNotFound do diff --git a/test/unit/approve_comment_test.rb b/test/unit/approve_comment_test.rb index 29d8353..c49237e 100644 --- a/test/unit/approve_comment_test.rb +++ b/test/unit/approve_comment_test.rb @@ -130,7 +130,7 @@ class ApproveCommentTest < ActiveSupport::TestCase should 'display anonymous name if the requestor is nil' do a = ApproveComment.create!(:target => @community, :comment_attributes => @comment.attributes.to_json, :requestor => nil) - assert_match /nonymous/, a.information[:message] + assert_match /nonymous/, a.information[:variables][:requestor] end should 'accept_details be true' do @@ -211,6 +211,7 @@ class ApproveCommentTest < ActiveSupport::TestCase should 'requestor name be Anonymous if there is no requestor' do a = fast_create(ApproveComment, :target_id => community) + a.comment_attributes = @comment.attributes.to_json assert_equal 'Anonymous', a.requestor_name end -- libgit2 0.21.2