X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/d8c1b28fde32414c9fd7f212dff8954942ef0b5c..809a8b3db0f09199ae798de102cc926f87958c82:/test/system/index_test.rb diff --git a/test/system/index_test.rb b/test/system/index_test.rb new file mode 100644 index 000000000..bb23cee60 --- /dev/null +++ b/test/system/index_test.rb @@ -0,0 +1,21 @@ +require "application_system_test_case" + +class IndexTest < ApplicationSystemTestCase + test "node included in edit link" do + node = create(:node) + visit node_path(node) + assert_selector "#editanchor[href*='?node=#{node.id}#']" + + find("#sidebar .btn-close").click + assert_no_selector "#editanchor[href*='?node=#{node.id}#']" + end + + test "note included in edit link" do + note = create(:note_with_comments) + visit browse_note_path(note) + assert_selector "#editanchor[href*='?note=#{note.id}#']" + + find("#sidebar .btn-close").click + assert_no_selector "#editanchor[href*='?note=#{note.id}#']" + end +end