2 Feature: v1/reverse Parameter Tests
3 Tests for parameter inputs for the v1 reverse endpoint.
4 This file contains mostly bad parameter input. Valid parameters
5 are tested in the format tests.
8 When sending v1/reverse at 47.14122383,9.52169581334 with format sdf
9 Then a HTTP 400 is returned
11 Scenario: Missing lon parameter
12 When sending v1/reverse at 52.52,
13 Then a HTTP 400 is returned
16 Scenario: Missing lat parameter
17 When sending v1/reverse at ,52.52
18 Then a HTTP 400 is returned
21 Scenario: Missing osm_id parameter
22 When sending v1/reverse at ,
25 Then a HTTP 400 is returned
28 Scenario: Missing osm_type parameter
29 When sending v1/reverse at ,
32 Then a HTTP 400 is returned
35 Scenario Outline: Bad format for lat or lon
36 When sending v1/reverse at ,
39 Then a HTTP 400 is returned
52 | <script></script> | 3.4 |
53 | 3.4 | <script></script> |
58 Scenario: Non-numerical zoom levels return an error
59 When sending v1/reverse at 47.14122383,9.52169581334
62 Then a HTTP 400 is returned
65 Scenario Outline: Truthy values for boolean parameters
66 When sending v1/reverse at 47.14122383,9.52169581334
69 Then exactly 1 result is returned
70 And result has attributes address
72 When sending v1/reverse at 47.14122383,9.52169581334
75 Then exactly 1 result is returned
76 And result has attributes extratags
78 When sending v1/reverse at 47.14122383,9.52169581334
81 Then exactly 1 result is returned
82 And result has attributes namedetails
84 When sending v1/reverse at 47.14122383,9.52169581334
87 Then exactly 1 result is returned
88 And result has attributes geojson
90 When sending v1/reverse at 47.14122383,9.52169581334
93 Then exactly 1 result is returned
94 And result has attributes geokml
96 When sending v1/reverse at 47.14122383,9.52169581334
99 Then exactly 1 result is returned
100 And result has attributes svg
102 When sending v1/reverse at 47.14122383,9.52169581334
105 Then exactly 1 result is returned
106 And result has attributes geotext
118 Scenario: Only one geometry can be requested
119 When sending v1/reverse at 47.165989816710066,9.515774846076965
120 | polygon_text | polygon_svg |
122 Then a HTTP 400 is returned
125 Scenario Outline: Wrapping of legal jsonp requests
126 When sending v1/reverse at 67.3245,0.456 with format <format>
129 Then the result is valid <outformat>
132 | format | outformat |
135 | geojson | geojson |
136 | geocodejson | geocodejson |
139 Scenario Outline: Illegal jsonp are not allowed
140 When sending v1/reverse at 47.165989816710066,9.515774846076965
142 |json_callback | <data> |
143 Then a HTTP 400 is returned
154 Scenario Outline: Reverse debug mode produces valid HTML
155 When sending v1/reverse at , with format debug
158 Then the result is valid html
163 | 47.06645 | 9.56601 |
164 | 47.14081 | 9.52267 |
167 Scenario Outline: Full address display for city housenumber-level address with street
168 When sending v1/reverse at 47.1068011,9.52810091 with format <format>
169 Then address of result 0 is
173 | neighbourhood | Oberdorf |
174 | village | Triesen |
175 | ISO3166-2-lvl8 | LI-09 |
176 | county | Oberland |
178 | country | Liechtenstein |
179 | country_code | li |
189 Scenario Outline: Results with name details
190 When sending v1/reverse at 47.14052,9.52202 with format <format>
191 | zoom | namedetails |
193 Then results contain in field namedetails
205 Scenario Outline: Results with extratags
206 When sending v1/reverse at 47.14052,9.52202 with format <format>
209 Then results contain in field extratags