]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/bdd/api/search/structured.feature
Merge pull request #3222 from lonvia/fix-river-output
[nominatim.git] / test / bdd / api / search / structured.feature
index c93603d6e00d57096bd9bcd8b67e9b6d5c5339e5..517c0eddd229c16e2a2d33057783d9f280a3dad7 100644 (file)
@@ -15,13 +15,13 @@ Feature: Structured search queries
     Scenario: Postcode only
         When sending json search query "" with address
           | postalcode |
     Scenario: Postcode only
         When sending json search query "" with address
           | postalcode |
-          | 22547 |
+          | 9495 |
         Then results contain
           | type |
         Then results contain
           | type |
-          | postcode |
+          | ^post(al_)?code |
         And result addresses contain
           | postcode |
         And result addresses contain
           | postcode |
-          | 22547 |
+          | 9495 |
 
     Scenario: Street, postcode and country
         When sending xml search query "" with address
 
     Scenario: Street, postcode and country
         When sending xml search query "" with address
@@ -31,8 +31,38 @@ Feature: Structured search queries
           | attr        | value |
           | querystring | Old Palace Road, GU2 7UP, United Kingdom |
 
           | attr        | value |
           | querystring | Old Palace Road, GU2 7UP, United Kingdom |
 
-    Scenario: gihub #176
+    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 | bar  |
+        Then result addresses contain
+          | country |
+          | Liechtenstein |
+        And  results contain
+          | class   | type |
+          | amenity | ^(pub)\|(bar)\|(restaurant) |
+
+    #176
+    Scenario: Structured search restricts rank
         When sending json search query "" with address
           | city |
         When sending json search query "" with address
           | city |
-          | Mercedes |
-        Then at least 1 result is returned
+          | Vaduz |
+        Then result addresses contain
+          | town |
+          | Vaduz |