From: Anton Khorev Date: Fri, 14 Mar 2025 11:42:00 +0000 (+0300) Subject: Test map centering on a node X-Git-Tag: live~7^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/e4a092ff361e50a16bf22f9e67c3a969c3f4d303?hp=-c Test map centering on a node --- e4a092ff361e50a16bf22f9e67c3a969c3f4d303 diff --git a/test/system/browse_test.rb b/test/system/browse_test.rb index 15dc1cb9b..3faf3b75f 100644 --- a/test/system/browse_test.rb +++ b/test/system/browse_test.rb @@ -10,4 +10,14 @@ class BrowseTest < ApplicationSystemTestCase assert_selector "#map .leaflet-overlay-pane path" end + + test "map should center on a viewed node" do + node = create(:node, :lat => 59.55555, :lon => 29.55555) + + visit node_path(node) + + find("#map [aria-label='Share']").click + share_url = find_by_id("long_input").value + assert_match %r{map=\d+/59\.\d+/29\.\d+}, share_url + end end