1 require "application_system_test_case"
3 class ResolveNoteTest < ApplicationSystemTestCase
4 test "can resolve an open note" do
5 note = create(:note_with_comments)
11 assert_button "Resolve"
12 assert_no_button "Comment & Resolve"
13 assert_no_button "Reactivate"
17 assert_content "Resolved note ##{note.id}"
21 test "can resolve an open note with a comment" do
22 note = create(:note_with_comments)
28 assert_button "Resolve"
29 assert_no_button "Comment & Resolve"
30 assert_no_button "Reactivate"
32 fill_in "text", :with => "Note resolve text"
34 assert_button "Comment & Resolve"
36 click_on "Comment & Resolve"
38 assert_content "Resolved note ##{note.id}"
39 assert_content "Note resolve text"
43 test "can reactivate a closed note" do
44 note = create(:note_with_comments, :closed)
50 assert_no_button "Resolve"
51 assert_no_button "Comment & Resolve"
52 assert_button "Reactivate"
56 assert_content "Unresolved note ##{note.id}"
57 assert_no_content "<iframe" # leak from share textarea