X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/61c32388a9d9543ce0b3144fdfac22c73c9efe7f..5411be67506cb89f17b07e81e85a8f2fc89fec63:/test/system/changeset_comments_test.rb?ds=sidebyside diff --git a/test/system/changeset_comments_test.rb b/test/system/changeset_comments_test.rb index beed3238c..51695c516 100644 --- a/test/system/changeset_comments_test.rb +++ b/test/system/changeset_comments_test.rb @@ -22,4 +22,26 @@ class ChangesetCommentsTest < ApplicationSystemTestCase assert_link "Log in to join the discussion", :href => login_path(:referer => changeset_path(changeset)) end end + + test "can add a comment to a changeset" do + changeset = create(:changeset, :closed) + user = create(:user) + sign_in_as(user) + visit changeset_path(changeset) + + within_sidebar do + assert_no_content "Comment from #{user.display_name}" + assert_no_content "Some newly added changeset comment" + assert_button "Comment", :disabled => true + + fill_in "text", :with => "Some newly added changeset comment" + + assert_button "Comment", :disabled => false + + click_on "Comment" + + assert_content "Comment from #{user.display_name}" + assert_content "Some newly added changeset comment" + end + end end