X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/5d656891ba072d88b8b281d239d0dce9f7bd6a1c..eed7abb839b81617ae5ece06ce84560ecdc2ae45:/test/bdd/api/search/queries.feature?ds=sidebyside diff --git a/test/bdd/api/search/queries.feature b/test/bdd/api/search/queries.feature index 3a62c581..d378d3f8 100644 --- a/test/bdd/api/search/queries.feature +++ b/test/bdd/api/search/queries.feature @@ -15,6 +15,7 @@ Feature: Search queries | postcode | 9497 | | country | Liechtenstein | | country_code | li | + | ISO3166-2-lvl8 | LI-10 | Scenario: House number interpolation When sending json search query "Grosssteg 1023, Triesenberg" with address @@ -41,6 +42,7 @@ Feature: Search queries | town | Triesenberg | | country | Liechtenstein | | country_code | li | + | ISO3166-2-lvl8 | LI-10 | Scenario Outline: Housenumber 0 can be found When sending search query "Gnalpstrasse 0" with address @@ -66,7 +68,7 @@ Feature: Search queries | way | ^697,.* | Scenario: Search with class-type feature - When sending jsonv2 search query "Hotel in California" + When sending jsonv2 search query "bars in ebenholz" Then results contain | place_rank | | 30 | @@ -80,6 +82,15 @@ Feature: Search queries | class | type | | amenity | restaurant | + Scenario: Search with specific amenity also work in country + When sending json search query "restaurants in liechtenstein" with address + Then result addresses contain + | country | + | Liechtenstein | + And results contain + | class | type | + | amenity | restaurant | + Scenario: Search with key-value amenity When sending json search query "[club=scout] Vaduz" Then results contain @@ -114,6 +125,19 @@ Feature: Search queries | class | type | | leisure | firepit | + Scenario Outline: Key/value search near given coordinate can be restricted to country + When sending json search query "[natural=peak] 47.06512,9.53965" with address + | countrycodes | + | | + Then result addresses contain + | country_code | + | | + + Examples: + | cc | + | li | + | ch | + Scenario: Name search near given coordinate When sending json search query "sporry" with address Then result addresses contain @@ -141,11 +165,19 @@ Feature: Search queries Then exactly 0 results are returned Scenario: Ignore country searches when query is restricted to countries - When sending json search query "de" + When sending json search query "fr" | countrycodes | | li | Then exactly 0 results are returned + Scenario: Country searches only return results for the given country + When sending search query "Ans Trail" with address + | countrycodes | + | li | + Then result addresses contain + | country_code | + | li | + # https://trac.openstreetmap.org/ticket/5094 Scenario: housenumbers are ordered by complete match first When sending json search query "Austrasse 11, Vaduz" with address @@ -182,3 +214,7 @@ Feature: Search queries Then result addresses contain | ID | town | | 0 | Vaduz | + + Scenario: Search can handle complex query word sets + When sending search query "aussenstelle universitat lichtenstein wachterhaus aussenstelle universitat lichtenstein wachterhaus aussenstelle universitat lichtenstein wachterhaus aussenstelle universitat lichtenstein wachterhaus" + Then a HTTP 200 is returned