1 require "application_system_test_case"
3 class NoteCommentsTest < ApplicationSystemTestCase
4 test "open note has login notice" do
5 note = create(:note_with_comments)
8 assert_no_button "Resolve"
9 assert_no_button "Comment"
10 assert_link "Log in to comment on this note", :href => login_path(:referer => note_path(note))
13 test "closed note has no login notice" do
14 note = create(:note_with_comments, :closed)
17 assert_no_button "Reactivate"
18 assert_no_link "Log in to comment on this note"
22 note = create(:note_with_comments)
27 assert_no_content "Comment from #{user.display_name}"
28 assert_no_content "Some newly added note comment"
29 assert_button "Resolve"
30 assert_button "Comment", :disabled => true
32 fill_in "text", :with => "Some newly added note comment"
34 assert_button "Comment & Resolve"
35 assert_button "Comment", :disabled => false
39 assert_content "Comment from #{user.display_name}"
40 assert_content "Some newly added note comment"