X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0931f474836d12d24a11564e77dcb1bb69b170dc..25e4a80760d29d6026df5b5fa3f2ac121dcfe957:/test/system/resolve_note_test.rb diff --git a/test/system/resolve_note_test.rb b/test/system/resolve_note_test.rb index 90990dcbd..f9152d99b 100644 --- a/test/system/resolve_note_test.rb +++ b/test/system/resolve_note_test.rb @@ -9,6 +9,7 @@ class ResolveNoteTest < ApplicationSystemTestCase within_sidebar do assert_button "Resolve" + assert_no_button "Comment & Resolve" assert_no_button "Reactivate" click_on "Resolve" @@ -17,6 +18,28 @@ class ResolveNoteTest < ApplicationSystemTestCase end end + test "can resolve an open note with a comment" do + note = create(:note_with_comments) + user = create(:user) + sign_in_as(user) + visit note_path(note) + + within_sidebar do + assert_button "Resolve" + assert_no_button "Comment & Resolve" + assert_no_button "Reactivate" + + fill_in "text", :with => "Note resolve text" + + assert_button "Comment & Resolve" + + click_on "Comment & Resolve" + + assert_content "Resolved note ##{note.id}" + assert_content "Note resolve text" + end + end + test "can reactivate a closed note" do note = create(:note_with_comments, :closed) user = create(:user) @@ -25,6 +48,7 @@ class ResolveNoteTest < ApplicationSystemTestCase within_sidebar do assert_no_button "Resolve" + assert_no_button "Comment & Resolve" assert_button "Reactivate" click_on "Reactivate"