]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/4992'
authorTom Hughes <tom@compton.nu>
Wed, 17 Jul 2024 17:40:11 +0000 (18:40 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 17 Jul 2024 17:40:11 +0000 (18:40 +0100)
21 files changed:
Gemfile.lock
app/assets/images/banners/SOTMAsia_x_FOSS4G_2023.jpg [deleted file]
app/assets/images/banners/StateOfTheMapAfrica_2023.jpg [deleted file]
app/assets/images/banners/StateOfTheMapAfrica_2023@2x.jpg [deleted file]
app/assets/images/banners/sotm_2024.png [new file with mode: 0644]
app/assets/images/banners/sotm_2024@2x.png [new file with mode: 0644]
app/assets/javascripts/auth_providers.js
app/assets/javascripts/index/search.js
app/assets/javascripts/leaflet.share.js
app/controllers/export_controller.rb
app/helpers/user_helper.rb
app/views/application/_auth_providers.html.erb
app/views/diary_entries/show.html.erb
config/banners.yml
config/locales/en.yml
test/controllers/api/changeset_comments_controller_test.rb
test/controllers/api/changesets_controller_test.rb
test/controllers/changeset_comments_controller_test.rb
test/controllers/export_controller_test.rb
test/helpers/user_helper_test.rb
test/system/search_test.rb [new file with mode: 0644]

index 284e97adc9fa92bf307cada90a90c0e85128a29f..412ef4820a8e63330c8501f1e840b1e1bf5ca318 100644 (file)
@@ -95,7 +95,7 @@ GEM
     autoprefixer-rails (10.4.16.0)
       execjs (~> 2)
     aws-eventstream (1.3.0)
-    aws-partitions (1.954.0)
+    aws-partitions (1.956.0)
     aws-sdk-core (3.201.1)
       aws-eventstream (~> 1, >= 1.3.0)
       aws-partitions (~> 1, >= 1.651.0)
@@ -256,7 +256,8 @@ GEM
     google-protobuf (3.25.3)
     hashdiff (1.1.0)
     hashie (5.0.0)
-    highline (3.0.1)
+    highline (3.1.0)
+      reline
     htmlentities (4.3.4)
     http_accept_language (2.1.1)
     i18n (1.14.5)
@@ -484,7 +485,7 @@ GEM
       io-console (~> 0.5)
     request_store (1.7.0)
       rack (>= 1.4)
-    rexml (3.3.1)
+    rexml (3.3.2)
       strscan
     rinku (2.0.6)
     rotp (6.3.0)
@@ -508,7 +509,7 @@ GEM
       rubocop (~> 1.41)
     rubocop-factory_bot (2.26.1)
       rubocop (~> 1.61)
-    rubocop-minitest (0.35.0)
+    rubocop-minitest (0.35.1)
       rubocop (>= 1.61, < 2.0)
       rubocop-ast (>= 1.31.1, < 2.0)
     rubocop-performance (1.21.1)
diff --git a/app/assets/images/banners/SOTMAsia_x_FOSS4G_2023.jpg b/app/assets/images/banners/SOTMAsia_x_FOSS4G_2023.jpg
deleted file mode 100644 (file)
index f4a498c..0000000
Binary files a/app/assets/images/banners/SOTMAsia_x_FOSS4G_2023.jpg and /dev/null differ
diff --git a/app/assets/images/banners/StateOfTheMapAfrica_2023.jpg b/app/assets/images/banners/StateOfTheMapAfrica_2023.jpg
deleted file mode 100644 (file)
index b2bf062..0000000
Binary files a/app/assets/images/banners/StateOfTheMapAfrica_2023.jpg and /dev/null differ
diff --git a/app/assets/images/banners/StateOfTheMapAfrica_2023@2x.jpg b/app/assets/images/banners/StateOfTheMapAfrica_2023@2x.jpg
deleted file mode 100644 (file)
index d7d362a..0000000
Binary files a/app/assets/images/banners/StateOfTheMapAfrica_2023@2x.jpg and /dev/null differ
diff --git a/app/assets/images/banners/sotm_2024.png b/app/assets/images/banners/sotm_2024.png
new file mode 100644 (file)
index 0000000..6e0af8e
Binary files /dev/null and b/app/assets/images/banners/sotm_2024.png differ
diff --git a/app/assets/images/banners/sotm_2024@2x.png b/app/assets/images/banners/sotm_2024@2x.png
new file mode 100644 (file)
index 0000000..e505e7f
Binary files /dev/null and b/app/assets/images/banners/sotm_2024@2x.png differ
index 38a7287a0281cc1e0c849b3b22a6b69216b0036d..fe0a4fdce4b4f8893b72ed78b35e7046f025e740 100644 (file)
@@ -10,7 +10,6 @@ $(document).ready(function () {
 
   // Add click handler to show OpenID field
   $("#openid_open_url").click(function () {
-    $("#openid_url").val("http://");
     $("#login_auth_buttons").hide();
     $("#openid_login_form").show();
   });
index 2f3882e3ae126e9486d7a9fd6929e0b182365102..476ad30a1ac11de80ad555ecf430ca6ef61923b1 100644 (file)
@@ -118,8 +118,13 @@ OSM.Search = function (map) {
 
   page.pushstate = page.popstate = function (path) {
     var params = Qs.parse(path.substring(path.indexOf("?") + 1));
-    $(".search_form input[name=query]").val(params.query);
-    $(".describe_location").hide();
+    if (params.query) {
+      $(".search_form input[name=query]").val(params.query);
+      $(".describe_location").hide();
+    } else if (params.lat && params.lon) {
+      $(".search_form input[name=query]").val(params.lat + ", " + params.lon);
+      $(".describe_location").hide();
+    }
     OSM.loadSidebarContent(path, page.load);
   };
 
index b92d7079686d41aea396554a270bf96b91946a25..40ba020e6c36ac0ac82cd6367a934cf9cf24897d 100644 (file)
@@ -160,6 +160,7 @@ L.OSM.share = function (options) {
     $("<div>")
       .appendTo($form)
       .attr("class", "row mb-3")
+      .attr("id", "mapnik_scale_row")
       .append($("<label>")
         .attr("for", "mapnik_scale")
         .attr("class", "col-auto col-form-label")
@@ -195,7 +196,7 @@ L.OSM.share = function (options) {
             .attr("class", "form-check-input")
             .bind("change", toggleFilter))));
 
-    ["minlon", "minlat", "maxlon", "maxlat"].forEach(function (name) {
+    ["minlon", "minlat", "maxlon", "maxlat", "lat", "lon"].forEach(function (name) {
       $("<input>")
         .attr("id", "mapnik_" + name)
         .attr("name", name)
@@ -204,11 +205,33 @@ L.OSM.share = function (options) {
     });
 
     $("<input>")
+      .attr("id", "map_format")
       .attr("name", "format")
       .attr("value", "mapnik")
       .attr("type", "hidden")
       .appendTo($form);
 
+    $("<input>")
+      .attr("id", "map_zoom")
+      .attr("name", "zoom")
+      .attr("value", map.getZoom())
+      .attr("type", "hidden")
+      .appendTo($form);
+
+    $("<input>")
+      .attr("id", "map_width")
+      .attr("name", "width")
+      .attr("value", 0)
+      .attr("type", "hidden")
+      .appendTo($form);
+
+    $("<input>")
+      .attr("id", "map_height")
+      .attr("name", "height")
+      .attr("value", 0)
+      .attr("type", "hidden")
+      .appendTo($form);
+
     var csrf_param = $("meta[name=csrf-param]").attr("content"),
         csrf_token = $("meta[name=csrf-token]").attr("content");
 
@@ -219,6 +242,7 @@ L.OSM.share = function (options) {
       .appendTo($form);
 
     var args = {
+      layer: "<span id=\"mapnik_image_layer\"></span>",
       width: "<span id=\"mapnik_image_width\"></span>",
       height: "<span id=\"mapnik_image_height\"></span>"
     };
@@ -381,11 +405,34 @@ L.OSM.share = function (options) {
         $("#mapnik_scale").val(scale);
       }
 
-      $("#mapnik_image_width").text(Math.round(size.x / scale / 0.00028));
-      $("#mapnik_image_height").text(Math.round(size.y / scale / 0.00028));
+      const mapWidth = Math.round(size.x / scale / 0.00028);
+      const mapHeight = Math.round(size.y / scale / 0.00028);
+      $("#mapnik_image_width").text(mapWidth);
+      $("#mapnik_image_height").text(mapHeight);
+
+      const layer = map.getMapBaseLayerId();
+      const layerKeys = new Map([
+        ["mapnik", "standard"],
+        ["cyclemap", "cycle_map"],
+        ["transportmap", "transport_map"]
+      ]);
 
-      if (map.getMapBaseLayerId() === "mapnik") {
+      $("#mapnik_image_layer").text(layerKeys.has(layer) ? I18n.t(`javascripts.map.base.${layerKeys.get(layer)}`) : "");
+      $("#map_format").val(layer);
+
+      $("#map_zoom").val(map.getZoom());
+      $("#mapnik_lon").val(map.getCenter().lng);
+      $("#mapnik_lat").val(map.getCenter().lat);
+      $("#map_width").val(mapWidth);
+      $("#map_height").val(mapHeight);
+
+      if (["cyclemap", "transportmap"].includes(map.getMapBaseLayerId())) {
+        $("#export-image").show();
+        $("#mapnik_scale_row").hide();
+        $("#export-warning").hide();
+      } else if (map.getMapBaseLayerId() === "mapnik") {
         $("#export-image").show();
+        $("#mapnik_scale_row").show();
         $("#export-warning").hide();
       } else {
         $("#export-image").hide();
index cddc97b6883e13044601c5b4a3a24b1f84d83f74..5a2b159ef6f991b96992367b3fd69e7c074de5a2 100644 (file)
@@ -13,19 +13,27 @@ class ExportController < ApplicationController
   # When the user clicks 'Export' we redirect to a URL which generates the export download
   def finish
     bbox = BoundingBox.from_lon_lat_params(params)
-    format = params[:format]
+    style = params[:format]
+    format = params[:mapnik_format]
 
-    case format
+    case style
     when "osm"
       # redirect to API map get
       redirect_to :controller => "api/map", :action => "index", :bbox => bbox
 
     when "mapnik"
       # redirect to a special 'export' cgi script
-      format = params[:mapnik_format]
       scale = params[:mapnik_scale]
 
       redirect_to "https://render.openstreetmap.org/cgi-bin/export?bbox=#{bbox}&scale=#{scale}&format=#{format}", :allow_other_host => true
+    when "cyclemap", "transportmap"
+      zoom = params[:zoom]
+      lat = params[:lat]
+      lon = params[:lon]
+      width = params[:width]
+      height = params[:height]
+
+      redirect_to "https://tile.thunderforest.com/static/#{style[..-4]}/#{lon},#{lat},#{zoom}/#{width}x#{height}.#{format}?apikey=#{Settings.thunderforest_key}", :allow_other_host => true
     end
   end
 
index 734a266db0bcaee9e9061f4d0ce2f4454d04a37b..5863a9403820b7e6bfa622d5c07aa21d587f0418 100644 (file)
@@ -52,29 +52,29 @@ module UserHelper
 
   # External authentication support
 
-  def auth_button(name, provider, options = {})
+  def auth_button(provider, options = {})
     link_to(
-      image_tag("#{name}.svg",
-                :alt => t("application.auth_providers.#{name}.alt"),
+      image_tag("#{provider}.svg",
+                :alt => t("application.auth_providers.#{provider}.alt"),
                 :class => "rounded-1",
                 :size => "36"),
       auth_path(options.merge(:provider => provider)),
       :method => :post,
       :class => "auth_button btn btn-light p-2",
-      :title => t("application.auth_providers.#{name}.title")
+      :title => t("application.auth_providers.#{provider}.title")
     )
   end
 
-  def auth_button_preferred(name, provider, options = {})
+  def auth_button_preferred(provider, options = {})
     link_to(
-      image_tag("#{name}.svg",
-                :alt => t("application.auth_providers.#{name}.alt"),
+      image_tag("#{provider}.svg",
+                :alt => t("application.auth_providers.#{provider}.alt"),
                 :class => "rounded-1 me-3",
-                :size => "36") + t("application.auth_providers.#{name}.title"),
+                :size => "36") + t("application.auth_providers.#{provider}.title"),
       auth_path(options.merge(:provider => provider)),
       :method => :post,
       :class => "auth_button btn btn-outline-secondary border py-2 px-4 d-flex justify-content-center align-items-center",
-      :title => t("application.auth_providers.#{name}.title")
+      :title => t("application.auth_providers.#{provider}.title")
     )
   end
 
index 96a20fd85740f3266a99b16505606747a65ca83f..c77a3ed3ee171700a5725e26542e02436e933dd8 100644 (file)
 
     <% if prefered_auth_button_available %>
       <div class="col justify-content-center d-flex align-items-center flex-wrap">
-        <% %w[google facebook microsoft github wikipedia].each do |provider| %>
-          <% if Settings.key?("#{provider}_auth_id".to_sym) -%>
-            <% if @preferred_auth_provider == provider %>
-              <%= auth_button_preferred provider, provider %>
-            <% end %>
-          <% end -%>
-        <% end -%>
+        <%= auth_button_preferred @preferred_auth_provider %>
       </div>
     <% end %>
 
@@ -35,7 +29,7 @@
       <% %w[google facebook microsoft github wikipedia].each do |provider| %>
         <% unless @preferred_auth_provider == provider %>
           <% if Settings.key?("#{provider}_auth_id".to_sym) -%>
-            <%= auth_button provider, provider %>
+            <%= auth_button provider %>
           <% end -%>
         <% end %>
       <% end -%>
@@ -50,7 +44,7 @@
         <%= t ".openid_url" %>
       </label>
       <%= hidden_field_tag("referer", params[:referer], :autocomplete => "off") %>
-      <%= text_field_tag("openid_url", "", :tabindex => 20, :autocomplete => "on", :class => "form-control") %>
+      <%= text_field_tag("openid_url", "https://", :tabindex => 20, :autocomplete => "on", :class => "form-control") %>
       <span class="form-text text-body-secondary">(<a href="<%= t "accounts.edit.openid.link" %>" target="_new"><%= t "accounts.edit.openid.link text" %></a>)</span>
     </div>
 
index cfed1c46d401ff469015c6c9357bd7e1ac81b58e..e80a44f096005c1bdac773818bb4bc5472841feb 100644 (file)
@@ -21,7 +21,7 @@
         <% if @entry.subscribers.exists?(current_user.id) %>
           <%= link_to t(".unsubscribe"), diary_entry_unsubscribe_path(@entry.user, @entry), :method => :post, :class => "btn btn-sm btn-primary" %>
         <% else %>
-          <%= link_to t(".subscribe"), diary_entry_subscribe_path(@entry.user, @entry.id), :method => :post, :class => "btn btn-sm btn-primary" %>
+          <%= link_to t(".subscribe"), diary_entry_subscribe_path(@entry.user, @entry), :method => :post, :class => "btn btn-sm btn-primary" %>
         <% end %>
       </div>
     <% end %>
index 2c8e1338af32d432ab56a51a6d4b15a7f00dbe90..1f2056194af646f0d373dce1ce49275956f5bb6d 100644 (file)
@@ -14,20 +14,13 @@ sotmeu_2024:
   link: https://openstreetmap.org.pl/2024/sotm-eu-2024-community-tickets-70/
   img: banners/StateoftheMapEurope_2024.png
   enddate: 2024-jul-18
-sotmasia_2023:
-  id: sotmasia_2023
-  alt: State of the Map Asia x Foss4G Thailand 2023
-  link: https://stateofthemap.asia/
-  img: banners/SOTMAsia_x_FOSS4G_2023.jpg
-  startdate: 2023-oct-18
-  enddate: 2023-nov-18
-sotmafrica_2023:
-  id: sotmafrica_2023
-  alt: State of the Map Africa 2023
-  link: https://2023.stateofthemap.africa
-  img: banners/StateOfTheMapAfrica_2023.jpg
+sotm_2024:
+  id: sotm_2024
+  alt: State of the Map 2024
+  link: https://2024.stateofthemap.org
+  img: banners/sotm_2024.png
   srcset:
-    - [banners/StateOfTheMapAfrica_2023.jpg, 1x]
-    - [banners/StateOfTheMapAfrica_2023@2x.jpg, 2x]
-  startdate: 2023-oct-30
-  enddate: 2023-nov-30
+    - [banners/sotm_2024.png, 1x]
+    - [banners/sotm_2024@2x.png, 2x]
+  startdate: 2024-jul-10
+  enddate: 2024-sep-05
\ No newline at end of file
index 0278bb8f2fc6a2a3ef0a46286ca7de337de51ddc..1def0f3eb9aaff088b76029fdfa1907bd22401f7 100644 (file)
@@ -3112,14 +3112,14 @@ en:
       custom_dimensions: "Set custom dimensions"
       format: "Format:"
       scale: "Scale:"
-      image_dimensions: "Image will show standard layer at %{width} x %{height}"
+      image_dimensions: "Image will show the %{layer} layer at %{width} x %{height}"
       download: "Download"
       short_url: "Short URL"
       include_marker: "Include marker"
       center_marker: "Center map on marker"
       paste_html: "Paste HTML to embed in website"
       view_larger_map: "View Larger Map"
-      only_standard_layer: "Only the standard layer can be exported as an image"
+      only_standard_layer: "Only the Standard, Cycle Map and Transport layers can be exported as an image"
     embed:
       report_problem: "Report a problem"
     key:
index e25926c78e41dfcf5bb691f268101256a83c3ce3..e7d8ca2095134abfbfc7ae43585633da8d1d615b 100644 (file)
@@ -225,21 +225,21 @@ module Api
       comment = create(:changeset_comment)
       assert comment.visible
 
-      post changeset_comment_hide_path(:id => comment)
+      post changeset_comment_hide_path(comment)
       assert_response :unauthorized
       assert comment.reload.visible
 
       auth_header = basic_authorization_header create(:user).email, "test"
 
       # not a moderator
-      post changeset_comment_hide_path(:id => comment), :headers => auth_header
+      post changeset_comment_hide_path(comment), :headers => auth_header
       assert_response :forbidden
       assert comment.reload.visible
 
       auth_header = basic_authorization_header create(:moderator_user).email, "test"
 
       # bad comment id
-      post changeset_comment_hide_path(:id => 999111), :headers => auth_header
+      post changeset_comment_hide_path(999111), :headers => auth_header
       assert_response :not_found
       assert comment.reload.visible
     end
@@ -252,7 +252,7 @@ module Api
 
       auth_header = basic_authorization_header create(:moderator_user).email, "test"
 
-      post changeset_comment_hide_path(:id => comment), :headers => auth_header
+      post changeset_comment_hide_path(comment), :headers => auth_header
       assert_response :success
       assert_not comment.reload.visible
     end
@@ -264,21 +264,21 @@ module Api
       comment = create(:changeset_comment, :visible => false)
       assert_not comment.visible
 
-      post changeset_comment_unhide_path(:id => comment)
+      post changeset_comment_unhide_path(comment)
       assert_response :unauthorized
       assert_not comment.reload.visible
 
       auth_header = basic_authorization_header create(:user).email, "test"
 
       # not a moderator
-      post changeset_comment_unhide_path(:id => comment), :headers => auth_header
+      post changeset_comment_unhide_path(comment), :headers => auth_header
       assert_response :forbidden
       assert_not comment.reload.visible
 
       auth_header = basic_authorization_header create(:moderator_user).email, "test"
 
       # bad comment id
-      post changeset_comment_unhide_path(:id => 999111), :headers => auth_header
+      post changeset_comment_unhide_path(999111), :headers => auth_header
       assert_response :not_found
       assert_not comment.reload.visible
     end
@@ -291,7 +291,7 @@ module Api
 
       auth_header = basic_authorization_header create(:moderator_user).email, "test"
 
-      post changeset_comment_unhide_path(:id => comment), :headers => auth_header
+      post changeset_comment_unhide_path(comment), :headers => auth_header
       assert_response :success
       assert comment.reload.visible
     end
index 17a9ad9d35ec901c289c6684ca2f94a839a33445..8bb22929444de2e8da30460c5b190544419cc8d9 100644 (file)
@@ -2592,7 +2592,7 @@ module Api
 
       # bad changeset id
       assert_no_difference "changeset.subscribers.count" do
-        post api_changeset_subscribe_path(:id => 999111), :headers => auth_header
+        post api_changeset_subscribe_path(999111), :headers => auth_header
       end
       assert_response :not_found
 
index 5d0f4b51f61792b9c88d025975fa50b64b712cb9..b03640eaba53b94d7995c6845c29803a9f2d7e6e 100644 (file)
@@ -41,25 +41,18 @@ class ChangesetCommentsControllerTest < ActionDispatch::IntegrationTest
     get changeset_comments_feed_path(:id => changeset.id, :format => "rss")
     assert_response :success
     assert_equal "application/rss+xml", @response.media_type
-    assert_select "rss", :count => 1 do
-      assert_select "channel", :count => 1 do
-        assert_select "item", :count => 3
-      end
-    end
-    # Rails::Dom::Testing.html_document_fragment.parse(icons)
-    # Gets comment Ids from HTML and checks that they are in descending order
-
     last_comment_id = -1
     assert_select "rss", :count => 1 do
-      assert_select "description", :count => 3 do |descriptions|
-        descriptions.children.each do |description|
-          changeset_dom = Rails::Dom::Testing.html_document_fragment.parse(description.content)
-          comment = changeset_dom.at_css(".changeset-comment-text")
-          next unless comment
-
-          id = comment.content.split[-1].to_i
-          assert_operator id, "<", last_comment_id if last_comment_id != -1
-          last_comment_id = id
+      assert_select "channel", :count => 1 do
+        assert_select "item", :count => 3 do |items|
+          items.each do |item|
+            assert_select item, "link", :count => 1 do |link|
+              match = assert_match(/^#{changeset_url changeset}#c(\d+)$/, link.text)
+              comment_id = match[1].to_i
+              assert_operator comment_id, "<", last_comment_id if last_comment_id != -1
+              last_comment_id = comment_id
+            end
+          end
         end
       end
     end
index e7539b41e560aabd3cfc5d0e4a63bb003a095141..64d5a686615e9d23988f759865eb872643b8bc4a 100644 (file)
@@ -28,6 +28,20 @@ class ExportControllerTest < ActionDispatch::IntegrationTest
     assert_redirected_to "https://render.openstreetmap.org/cgi-bin/export?bbox=0.0,50.0,1.0,51.0&scale=12&format=test"
   end
 
+  ###
+  # test the finish action for cyclemap images
+  def test_finish_cyclemap
+    post export_finish_path(:minlon => 0, :minlat => 50, :maxlon => 1, :maxlat => 51, :format => "cyclemap", :mapnik_scale => 12, :mapnik_format => "png", :zoom => 17, :lat => 1, :lon => 2, :width => 400, :height => 300)
+    assert_redirected_to "https://tile.thunderforest.com/static/cycle/2,1,17/400x300.png?apikey=#{Settings.thunderforest_key}"
+  end
+
+  ###
+  # test the finish action for transport images
+  def test_finish_transport
+    post export_finish_path(:minlon => 0, :minlat => 50, :maxlon => 1, :maxlat => 51, :format => "transportmap", :mapnik_scale => 12, :mapnik_format => "png", :zoom => 17, :lat => 1, :lon => 2, :width => 400, :height => 300)
+    assert_redirected_to "https://tile.thunderforest.com/static/transport/2,1,17/400x300.png?apikey=#{Settings.thunderforest_key}"
+  end
+
   ##
   # test the embed action
   def test_embed
index 53b9a823bc6476804b53b2736c39e112d83b3fe7..c4020dd7f489dae05d157646e25e735110402627 100644 (file)
@@ -110,7 +110,7 @@ class UserHelperTest < ActionView::TestCase
   end
 
   def test_auth_button
-    button = auth_button("google", "google")
+    button = auth_button("google")
     img_tag = "<img alt=\"Google logo\" class=\"rounded-1\" src=\"/images/google.svg\" width=\"36\" height=\"36\" />"
     assert_equal("<a class=\"auth_button btn btn-light p-2\" title=\"Log in with Google\" rel=\"nofollow\" data-method=\"post\" href=\"/auth/google\">#{img_tag}</a>", button)
   end
diff --git a/test/system/search_test.rb b/test/system/search_test.rb
new file mode 100644 (file)
index 0000000..8cda1f7
--- /dev/null
@@ -0,0 +1,14 @@
+require "application_system_test_case"
+
+class SearchTest < ApplicationSystemTestCase
+  test "click on 'where is this' sets search input value" do
+    stub_request(:get, %r{^https://nominatim\.openstreetmap\.org/reverse\?})
+      .to_return(:status => 404)
+
+    visit "/#map=7/1.234/6.789"
+
+    assert_field "Search", :with => ""
+    click_on "Where is this?"
+    assert_field "Search", :with => "1.234, 6.789"
+  end
+end