3 Feature: v1/reverse Parameter Tests
4 Tests for parameter inputs for the v1 reverse endpoint.
5 This file contains mostly bad parameter input. Valid parameters
6 are tested in the format tests.
9 When sending v1/reverse at 47.14122383,9.52169581334 with format sdf
10 Then a HTTP 400 is returned
12 Scenario: Missing lon parameter
13 When sending v1/reverse at 52.52,
14 Then a HTTP 400 is returned
17 Scenario: Missing lat parameter
18 When sending v1/reverse at ,52.52
19 Then a HTTP 400 is returned
22 Scenario: Missing osm_id parameter
23 When sending v1/reverse at ,
26 Then a HTTP 400 is returned
29 Scenario: Missing osm_type parameter
30 When sending v1/reverse at ,
33 Then a HTTP 400 is returned
36 Scenario Outline: Bad format for lat or lon
37 When sending v1/reverse at ,
40 Then a HTTP 400 is returned
53 | <script></script> | 3.4 |
54 | 3.4 | <script></script> |
59 Scenario: Non-numerical zoom levels return an error
60 When sending v1/reverse at 47.14122383,9.52169581334
63 Then a HTTP 400 is returned
66 Scenario Outline: Truthy values for boolean parameters
67 When sending v1/reverse at 47.14122383,9.52169581334
70 Then exactly 1 result is returned
71 And result has attributes address
73 When sending v1/reverse at 47.14122383,9.52169581334
76 Then exactly 1 result is returned
77 And result has attributes extratags
79 When sending v1/reverse at 47.14122383,9.52169581334
82 Then exactly 1 result is returned
83 And result has attributes namedetails
85 When sending v1/reverse at 47.14122383,9.52169581334
88 Then exactly 1 result is returned
89 And result has attributes geojson
91 When sending v1/reverse at 47.14122383,9.52169581334
94 Then exactly 1 result is returned
95 And result has attributes geokml
97 When sending v1/reverse at 47.14122383,9.52169581334
100 Then exactly 1 result is returned
101 And result has attributes svg
103 When sending v1/reverse at 47.14122383,9.52169581334
106 Then exactly 1 result is returned
107 And result has attributes geotext
119 Scenario: Only one geometry can be requested
120 When sending v1/reverse at 47.165989816710066,9.515774846076965
121 | polygon_text | polygon_svg |
123 Then a HTTP 400 is returned
126 Scenario Outline: Wrapping of legal jsonp requests
127 When sending v1/reverse at 67.3245,0.456 with format <format>
130 Then the result is valid <outformat>
133 | format | outformat |
136 | geojson | geojson |
137 | geocodejson | geocodejson |
140 Scenario Outline: Illegal jsonp are not allowed
141 When sending v1/reverse at 47.165989816710066,9.515774846076965
143 |json_callback | <data> |
144 Then a HTTP 400 is returned
155 Scenario Outline: Reverse debug mode produces valid HTML
156 When sending v1/reverse at , with format debug
159 Then the result is valid html
164 | 47.06645 | 9.56601 |
165 | 47.14081 | 9.52267 |
168 Scenario Outline: Full address display for city housenumber-level address with street
169 When sending v1/reverse at 47.1068011,9.52810091 with format <format>
170 Then address of result 0 is
174 | neighbourhood | Oberdorf |
175 | village | Triesen |
176 | ISO3166-2-lvl8 | LI-09 |
177 | county | Oberland |
179 | country | Liechtenstein |
180 | country_code | li |
190 Scenario Outline: Results with name details
191 When sending v1/reverse at 47.14052,9.52202 with format <format>
192 | zoom | namedetails |
194 Then results contain in field namedetails
206 Scenario Outline: Results with extratags
207 When sending v1/reverse at 47.14052,9.52202 with format <format>
210 Then results contain in field extratags