From: Anton Khorev Date: Thu, 19 Dec 2024 02:14:15 +0000 (+0300) Subject: Test share textarea not to leak into note text on reactivation X-Git-Tag: live~118^2~3 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/0931f474836d12d24a11564e77dcb1bb69b170dc Test share textarea not to leak into note text on reactivation --- diff --git a/test/system/resolve_note_test.rb b/test/system/resolve_note_test.rb new file mode 100644 index 000000000..90990dcbd --- /dev/null +++ b/test/system/resolve_note_test.rb @@ -0,0 +1,36 @@ +require "application_system_test_case" + +class ResolveNoteTest < ApplicationSystemTestCase + test "can resolve an open note" 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 "Reactivate" + + click_on "Resolve" + + assert_content "Resolved note ##{note.id}" + end + end + + test "can reactivate a closed note" do + note = create(:note_with_comments, :closed) + user = create(:user) + sign_in_as(user) + visit note_path(note) + + within_sidebar do + assert_no_button "Resolve" + assert_button "Reactivate" + + click_on "Reactivate" + + assert_content "Unresolved note ##{note.id}" + assert_no_content "