]> git.openstreetmap.org Git - nominatim.git/blobdiff - tests/features/api/search.feature
Merge pull request #219 from mizabrik/master
[nominatim.git] / tests / features / api / search.feature
index 9b861a7bb5be61e1731e6e4c258fc96852ca2e37..656bfb2948df6c31f1322b325b192174aa1bc6a6 100644 (file)
@@ -16,17 +16,17 @@ Feature: Search queries
     Scenario: House number search for non-street address
         Given the request parameters
           | accept-language
-          | en        
-        When sending json search query "4 Pomocnia, Poland" with address
-        Then address of result 0 is
+          | en
+        When sending json search query "4 Pomocnia, Pokrzywnica, Poland" with address
+        Then address of result 0 contains
           | type         | value
           | house_number | 4
-          | suburb       | Pomocnia
           | county       | gmina Pokrzywnica
           | state        | Masovian Voivodeship
           | postcode     | 06-121
           | country      | Poland
           | country_code | pl
+        Then address of result 0 does not contain road
 
     Scenario: House number interpolation even
         Given the request parameters
@@ -36,7 +36,7 @@ Feature: Search queries
         Then address of result 0 contains
           | type         | value
           | house_number | 140
-          | road         | rue Don Bosco
+          | road         | [Rr]ue Don Bosco
           | city         | Saguenay
           | state        | Quebec
           | country      | Canada
@@ -50,19 +50,25 @@ Feature: Search queries
         Then address of result 0 contains
           | type         | value
           | house_number | 141
-          | road         | rue Don Bosco
+          | road         | [rR]ue Don Bosco
           | city         | Saguenay
           | state        | Quebec
           | country      | Canada
           | country_code | ca
 
+    @Tiger
     Scenario: TIGER house number
         When sending json search query "3 West Victory Way, Craig"
-        Then result 0 has not attributes osm_id,osm_type
+        Then results contain
+         | osm_type
+         | tiger
 
+    @Tiger
     Scenario: TIGER house number (road fallback)
         When sending json search query "3030 West Victory Way, Craig"
-        Then result 0 has attributes osm_id,osm_type
+        Then results contain
+         | osm_type
+         | way
 
     Scenario: Expansion of Illinois
         Given the request parameters
@@ -72,3 +78,9 @@ Feature: Search queries
         Then results contain
           | ID | display_name
           | 0  | Illinois.*
+
+    Scenario: Search with class-type feature
+        When sending jsonv2 search query "Hotel California"
+        Then results contain
+          | place_rank
+          | 30