]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/bdd/api/search/structured.feature
Merge pull request #3273 from lonvia/search-with-sqlite
[nominatim.git] / test / bdd / api / search / structured.feature
index f45a1a6dcaac19bcd04764d08211ec88b0d06cf3..a1dd5b83d4621b07dd670f3311dbf8d165cc0cce 100644 (file)
@@ -1,3 +1,4 @@
+@SQLITE
 @APIDB
 Feature: Structured search queries
     Testing correctness of results with
@@ -15,13 +16,13 @@ Feature: Structured search queries
     Scenario: Postcode only
         When sending json search query "" with address
           | postalcode |
-          | 22547 |
+          | 9495 |
         Then results contain
           | type |
-          | postcode |
+          | ^post(al_)?code |
         And result addresses contain
           | postcode |
-          | 22547 |
+          | 9495 |
 
     Scenario: Street, postcode and country
         When sending xml search query "" with address
@@ -31,19 +32,38 @@ Feature: Structured search queries
           | attr        | value |
           | querystring | Old Palace Road, GU2 7UP, United Kingdom |
 
+    Scenario: Street with housenumber, city and postcode
+        When sending xml search query "" with address
+          | street             | city  | postalcode |
+          | 19 Am schrägen Weg | Vaduz | 9490       |
+        Then result addresses contain
+          | house_number | road |
+          | 19           | Am Schrägen Weg |
+
+    Scenario: Street with housenumber, city and bad postcode
+        When sending xml search query "" with address
+          | street             | city  | postalcode |
+          | 19 Am schrägen Weg | Vaduz | 9491       |
+        Then result addresses contain
+          | house_number | road |
+          | 19           | Am Schrägen Weg |
+
     Scenario: Amenity, city
         When sending json search query "" with address
           | city  | amenity |
-          | Vaduz | church  |
+          | Vaduz | bar  |
         Then result addresses contain
           | country |
           | Liechtenstein |
         And  results contain
           | class   | type |
-          | amenity | place_of_worship |
+          | amenity | ^(pub)\|(bar)\|(restaurant) |
 
-    Scenario: gihub #176
+    #176
+    Scenario: Structured search restricts rank
         When sending json search query "" with address
           | city |
-          | Mercedes |
-        Then at least 1 result is returned
+          | Vaduz |
+        Then result addresses contain
+          | town |
+          | Vaduz |