[openstreetmap/openstreetmap-website] Disable reverse geocoding in directions test (PR #6963)

Marwin Hochfelsner notifications at github.com
Tue Apr 7 20:23:11 UTC 2026


@hlfan commented on this pull request.



> @@ -95,4 +96,19 @@ def stub_routing(callback_code)
       });
     SCRIPT
   end
+
+  def stub_disable_reverse_geocoding
+    execute_script <<~SCRIPT
+      $(() => {
+        const originalFetch = window.fetch;
+        window.fetch = function(input, init) {
+          if (!input?.url?.startsWith(OSM.NOMINATIM_URL)) return originalFetch.apply(this, arguments);

and I'm not a fan of if modifiers in Ruby 😅 But others may have a different opinion.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6963#discussion_r3047664456
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6963/review/4071068717 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260407/acbe6868/attachment.htm>


More information about the rails-dev mailing list