[openstreetmap/openstreetmap-website] Disable reverse geocoding in directions test (PR #6963)
Pablo Brasero
notifications at github.com
Tue Apr 7 06:44:59 UTC 2026
@pablobm commented on this pull request.
> @@ -95,4 +96,21 @@ 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 Promise.resolve(new Response(JSON.stringify({}), {
+ status: 200,
+ headers: { "Content-Type": "application/json" }
+ }));
+ }
+ return originalFetch.apply(this, arguments);
Even if not necessary, I think this would look clearer inside an `else`.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6963#pullrequestreview-4066211156
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6963/review/4066211156 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260406/b51126b1/attachment.htm>
More information about the rails-dev
mailing list