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 Outline: Bad format for lat or lon
23 When sending v1/reverse at ,
26 Then a HTTP 400 is returned
39 | <script></script> | 3.4 |
40 | 3.4 | <script></script> |
45 Scenario: Non-numerical zoom levels return an error
46 When sending v1/reverse at 47.14122383,9.52169581334
49 Then a HTTP 400 is returned
52 Scenario Outline: Truthy values for boolean parameters
53 When sending v1/reverse at 47.14122383,9.52169581334
56 Then exactly 1 result is returned
57 And result has attributes address
59 When sending v1/reverse at 47.14122383,9.52169581334
62 Then exactly 1 result is returned
63 And result has attributes extratags
65 When sending v1/reverse at 47.14122383,9.52169581334
68 Then exactly 1 result is returned
69 And result has attributes namedetails
71 When sending v1/reverse at 47.14122383,9.52169581334
74 Then exactly 1 result is returned
75 And result has attributes geojson
77 When sending v1/reverse at 47.14122383,9.52169581334
80 Then exactly 1 result is returned
81 And result has attributes geokml
83 When sending v1/reverse at 47.14122383,9.52169581334
86 Then exactly 1 result is returned
87 And result has attributes svg
89 When sending v1/reverse at 47.14122383,9.52169581334
92 Then exactly 1 result is returned
93 And result has attributes geotext
105 Scenario: Only one geometry can be requested
106 When sending v1/reverse at 47.165989816710066,9.515774846076965
107 | polygon_text | polygon_svg |
109 Then a HTTP 400 is returned
112 Scenario Outline: Wrapping of legal jsonp requests
113 When sending v1/reverse at 67.3245,0.456 with format <format>
116 Then the result is valid <outformat>
119 | format | outformat |
122 | geojson | geojson |
123 | geocodejson | geocodejson |
126 Scenario Outline: Illegal jsonp are not allowed
127 When sending v1/reverse at 47.165989816710066,9.515774846076965
129 |json_callback | <data> |
130 Then a HTTP 400 is returned
140 Scenario Outline: Reverse debug mode produces valid HTML
141 When sending v1/reverse at , with format debug
144 Then the result is valid html
149 | 47.06645 | 9.56601 |
150 | 47.14081 | 9.52267 |
153 Scenario Outline: Full address display for city housenumber-level address with street
154 When sending v1/reverse at 47.1068011,9.52810091 with format <format>
155 Then address of result 0 is
159 | neighbourhood | Oberdorf |
160 | village | Triesen |
161 | ISO3166-2-lvl8 | LI-09 |
162 | county | Oberland |
164 | country | Liechtenstein |
165 | country_code | li |
175 Scenario Outline: Results with name details
176 When sending v1/reverse at 47.14052,9.52202 with format <format>
177 | zoom | namedetails |
179 Then results contain in field namedetails
191 Scenario Outline: Results with extratags
192 When sending v1/reverse at 47.14052,9.52202 with format <format>
195 Then results contain in field extratags