X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/3a696e1895ccd87ea03c16412870003630f3e23f..64abc90d3072bbfbc9aae316f5ef709b8782532e:/test/bdd/api/reverse/params.feature diff --git a/test/bdd/api/reverse/params.feature b/test/bdd/api/reverse/params.feature index 765c91c3..d6ef3794 100644 --- a/test/bdd/api/reverse/params.feature +++ b/test/bdd/api/reverse/params.feature @@ -3,7 +3,7 @@ Feature: Parameters for Reverse API Testing different parameter options for reverse API. Scenario Outline: Reverse-geocoding without address - When sending reverse coordinates 53.603,10.041 + When sending reverse coordinates 47.13,9.56 | addressdetails | | 0 | Then exactly 1 result is returned @@ -13,10 +13,53 @@ Feature: Parameters for Reverse API | format | | json | | jsonv2 | + | geojson | | xml | + Scenario Outline: Coordinates must be floating-point numbers + When sending reverse coordinates + Then a HTTP 400 is returned + + Examples: + | coords | + | -45.3,; | + | gkjd,50 | + + Scenario Outline: Zoom levels between 4 and 18 are allowed + When sending reverse coordinates 47.14122383,9.52169581334 + | zoom | + | | + Then exactly 1 result is returned + And result addresses contain + | country_code | + | li | + + Examples: + | zoom | + | 4 | + | 5 | + | 6 | + | 7 | + | 8 | + | 9 | + | 10 | + | 11 | + | 12 | + | 13 | + | 14 | + | 15 | + | 16 | + | 17 | + | 18 | + + Scenario: Non-numerical zoom levels return an error + When sending reverse coordinates 47.14122383,9.52169581334 + | zoom | + | adfe | + Then a HTTP 400 is returned + Scenario Outline: Reverse Geocoding with extratags - When sending reverse coordinates 10.776234290950017,106.70425325632095 + When sending reverse coordinates 47.1395013150811,9.522098077031046 | extratags | | 1 | Then result 0 has attributes extratags @@ -26,9 +69,10 @@ Feature: Parameters for Reverse API | xml | | json | | jsonv2 | + | geojson | Scenario Outline: Reverse Geocoding with namedetails - When sending reverse coordinates 10.776455623137625,106.70175343751907 + When sending reverse coordinates 47.1395013150811,9.522098077031046 | namedetails | | 1 | Then result 0 has attributes namedetails @@ -38,6 +82,7 @@ Feature: Parameters for Reverse API | xml | | json | | jsonv2 | + | geojson | Scenario Outline: Reverse Geocoding contains TEXT geometry When sending reverse coordinates 47.165989816710066,9.515774846076965 @@ -51,18 +96,6 @@ Feature: Parameters for Reverse API | json | geotext | | jsonv2 | geotext | - Scenario Outline: Reverse Geocoding contains polygon-as-points geometry - When sending reverse coordinates 47.165989816710066,9.515774846076965 - | polygon | - | 1 | - Then result 0 has not attributes - - Examples: - | format | response_attribute | - | xml | polygonpoints | - | json | polygonpoints | - | jsonv2 | polygonpoints | - Scenario Outline: Reverse Geocoding contains SVG geometry When sending reverse coordinates 47.165989816710066,9.515774846076965 | polygon_svg | @@ -98,5 +131,17 @@ Feature: Parameters for Reverse API | xml | geojson | | json | geojson | | jsonv2 | geojson | + | geojson | geojson | + Scenario Outline: Reverse Geocoding in geojson format contains no non-geojson geometry + When sending geojson reverse coordinates 47.165989816710066,9.515774846076965 + | polygon_text | polygon_svg | polygon_geokml | + | 1 | 1 | 1 | + Then result 0 has not attributes + Examples: + | response_attribute | + | geotext | + | polygonpoints | + | svg | + | geokml |