Set search input value to 'lat, lon' params if query param is missing

This commit is contained in:
Anton Khorev 2024-07-17 16:43:52 +03:00
parent 38cb875c20
commit 0e3f0fbfd4
2 changed files with 21 additions and 2 deletions

View file

@ -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