X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/5f2a5cadcb693b34b81a9232b8879c3b4f12843d..9224f825b5c0ce185fba62e37b3b6502e5f5e1b5:/test/system/index_test.rb diff --git a/test/system/index_test.rb b/test/system/index_test.rb index 2944b817e..8bee528d3 100644 --- a/test/system/index_test.rb +++ b/test/system/index_test.rb @@ -16,7 +16,7 @@ class IndexTest < ApplicationSystemTestCase visit node_path(node) find(".icon.share").click assert_no_selector "#content.overlay-right-sidebar" - find(".share-ui .btn-close").click + find("#map-ui .btn-close").click assert_selector "#content.overlay-right-sidebar" end @@ -56,20 +56,20 @@ class IndexTest < ApplicationSystemTestCase test "can navigate from hidden note to visible note" do sign_in_as(create(:moderator_user)) - hidden_note = create(:note, :status => "hidden") - create(:note_comment, :note => hidden_note, :body => "this-is-a-hidden-note") + hidden_note = create(:note, :status => "hidden", :description => "Hidden Note Description") + create(:note_comment, :note => hidden_note, :body => "this-is-a-hidden-note", :event => "opened") position = (1.003 * GeoRecord::SCALE).to_i - visible_note = create(:note, :latitude => position, :longitude => position) - create(:note_comment, :note => visible_note, :body => "this-is-a-visible-note") + visible_note = create(:note, :latitude => position, :longitude => position, :description => "Visible Note Description") + create(:note_comment, :note => visible_note, :body => "this-is-a-visible-note", :event => "opened") visit root_path(:anchor => "map=15/1/1") # view place of hidden note in case it is not rendered during note_path(hidden_note) visit note_path(hidden_note) find(".leaflet-control.control-layers .control-button").click find("#map-ui .overlay-layers .form-check-label", :text => "Map Notes").click visible_note_marker = find(".leaflet-marker-icon[title=this-is-a-visible-note]") - assert_selector "#sidebar", :text => "this-is-a-hidden-note" + assert_selector "#sidebar", :text => "Hidden Note Description" visible_note_marker.click - assert_selector "#sidebar", :text => "this-is-a-visible-note" + assert_selector "#sidebar", :text => "Visible Note Description" end end