1 require "application_system_test_case"
3 class NoteCommentsTest < ApplicationSystemTestCase
4 test "open note has login notice" do
5 note = create(:note_with_comments)
9 assert_no_button "Resolve"
10 assert_no_button "Comment"
11 assert_link "Log in to comment on this note", :href => login_path(:referer => note_path(note))
15 test "closed note has no login notice" do
16 note = create(:note_with_comments, :closed)
20 assert_no_button "Reactivate"
21 assert_no_link "Log in to comment on this note"
26 note = create(:note_with_comments)
32 assert_no_content "Comment from #{user.display_name}"
33 assert_no_content "Some newly added note comment"
34 assert_button "Resolve"
35 assert_button "Comment", :disabled => true
37 fill_in "text", :with => "Some newly added note comment"
39 assert_button "Comment & Resolve"
40 assert_button "Comment", :disabled => false
44 assert_content "Comment from #{user.display_name}"
45 assert_content "Some newly added note comment"