]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/bdd/api/search/params.feature
only print non-empty search tables
[nominatim.git] / test / bdd / api / search / params.feature
index 3f12f1c8f563e1c0ec751c14ac5a0ccf35b1722b..d5512f5b6640163a311bfad430f5b209ad604664 100644 (file)
@@ -68,14 +68,15 @@ Feature: Search queries
           | 0 |
         Then there are duplicates
 
           | 0 |
         Then there are duplicates
 
+    @fail-legacy
     Scenario: Search with bounded viewbox in right area
     Scenario: Search with bounded viewbox in right area
-        When sending json search query "bar" with address
+        When sending json search query "post" with address
           | bounded | viewbox |
           | 1       |  9,47,10,48 |
         Then result addresses contain
           | ID | town |
           | 0  | Vaduz |
           | bounded | viewbox |
           | 1       |  9,47,10,48 |
         Then result addresses contain
           | ID | town |
           | 0  | Vaduz |
-        When sending json search query "bar" with address
+        When sending json search query "post" with address
           | bounded | viewbox |
           | 1       |  9.49712,47.17122,9.52605,47.16242 |
         Then result addresses contain
           | bounded | viewbox |
           | 1       |  9.49712,47.17122,9.52605,47.16242 |
         Then result addresses contain
@@ -118,18 +119,18 @@ Feature: Search queries
         Then result has centroid in 9.49712,47.16242,9.52605,47.17122
 
     Scenario: Prefer results within viewbox
         Then result has centroid in 9.49712,47.16242,9.52605,47.17122
 
     Scenario: Prefer results within viewbox
-        When sending json search query "Gässle" with address
-          | accept-language |
-          | en |
-        Then result addresses contain
-          | ID | town |
-          | 0  | Balzers |
         When sending json search query "Gässle" with address
           | accept-language | viewbox |
           | en              | 9.52413,47.10759,9.53140,47.10539 |
         Then result addresses contain
           | ID | village |
           | 0  | Triesen |
         When sending json search query "Gässle" with address
           | accept-language | viewbox |
           | en              | 9.52413,47.10759,9.53140,47.10539 |
         Then result addresses contain
           | ID | village |
           | 0  | Triesen |
+        When sending json search query "Gässle" with address
+          | accept-language | viewbox |
+          | en              | 9.45949,47.08421,9.54094,47.05466 |
+        Then result addresses contain
+          | ID | town |
+          | 0  | Balzers |
 
     Scenario: viewboxes cannot be points
         When sending json search query "foo"
 
     Scenario: viewboxes cannot be points
         When sending json search query "foo"
@@ -171,10 +172,12 @@ Feature: Search queries
 
     Scenario: Limit number of search results
         When sending json search query "landstr"
 
     Scenario: Limit number of search results
         When sending json search query "landstr"
+          | dedupe |
+          | 0      |
         Then more than 4 results are returned
         When sending json search query "landstr"
         Then more than 4 results are returned
         When sending json search query "landstr"
-          | limit |
-          | 4 |
+          | limit | dedupe |
+          | 4     | 0      |
         Then exactly 4 results are returned
 
     Scenario: Limit parameter must be a number
         Then exactly 4 results are returned
 
     Scenario: Limit parameter must be a number
@@ -184,10 +187,6 @@ Feature: Search queries
         Then a HTTP 400 is returned
 
     Scenario: Restrict to feature type country
         Then a HTTP 400 is returned
 
     Scenario: Restrict to feature type country
-        When sending xml search query "fürstentum"
-        Then results contain
-          | ID | class |
-          | 1  | building |
         When sending xml search query "fürstentum"
           | featureType |
           | country |
         When sending xml search query "fürstentum"
           | featureType |
           | country |
@@ -197,7 +196,7 @@ Feature: Search queries
 
     Scenario: Restrict to feature type state
         When sending xml search query "Wangerberg"
 
     Scenario: Restrict to feature type state
         When sending xml search query "Wangerberg"
-        Then more than 1 result is returned
+        Then at least 1 result is returned
         When sending xml search query "Wangerberg"
           | featureType |
           | state |
         When sending xml search query "Wangerberg"
           | featureType |
           | state |
@@ -205,9 +204,7 @@ Feature: Search queries
 
     Scenario: Restrict to feature type city
         When sending xml search query "vaduz"
 
     Scenario: Restrict to feature type city
         When sending xml search query "vaduz"
-        Then results contain
-          | ID | place_rank |
-          | 1  | 30 |
+        Then at least 1 result is returned
         When sending xml search query "vaduz"
           | featureType |
           | city |
         When sending xml search query "vaduz"
           | featureType |
           | city |
@@ -355,6 +352,7 @@ Feature: Search queries
         | svg                |
         | geokml             |
 
         | svg                |
         | geokml             |
 
+    @v1-api-php-only
     Scenario: Search along a route
         When sending json search query "rathaus" with address
         Then result addresses contain
     Scenario: Search along a route
         When sending json search query "rathaus" with address
         Then result addresses contain
@@ -368,3 +366,10 @@ Feature: Search queries
           | Triesenberg |
 
 
           | Triesenberg |
 
 
+    Scenario: Array parameters are ignored
+        When sending json search query "Vaduz" with address
+          | countrycodes[] | polygon_svg[] | limit[] | polygon_threshold[] |
+          | IT             | 1             | 3       | 3.4                 |
+        Then result addresses contain
+          | ID | country_code |
+          | 0  | li           |