1 Feature: v1/reverse Parameter Tests
2 Tests for parameter inputs for the v1 reverse endpoint.
3 This file contains mostly bad parameter input. Valid parameters
4 are tested in the format tests.
7 When sending v1/reverse
9 | 47.14122383 | 9.52169581334 | sdf |
10 Then a HTTP 400 is returned
12 Scenario: Missing lon parameter
13 When sending v1/reverse
16 Then a HTTP 400 is returned
18 Scenario: Missing lat parameter
19 When sending v1/reverse
22 Then a HTTP 400 is returned
24 Scenario Outline: Bad format for lat or lon
25 When sending v1/reverse
28 Then a HTTP 400 is returned
41 | <script></script> | 3.4 |
42 | 3.4 | <script></script> |
46 Scenario: Non-numerical zoom levels return an error
47 When sending v1/reverse
49 | 47.14122383 | 9.52169581334 | adfe |
50 Then a HTTP 400 is returned
52 Scenario Outline: Truthy values for boolean parameters
53 When sending v1/reverse
54 | lat | lon | addressdetails |
55 | 47.14122383 | 9.52169581334 | <value> |
56 Then a HTTP 200 is returned
57 And the result is valid xml
58 And the result has attributes address
60 When sending v1/reverse
61 | lat | lon | extratags |
62 | 47.14122383 | 9.52169581334 | <value> |
63 Then a HTTP 200 is returned
64 And the result is valid xml
65 And the result has attributes extratags
67 When sending v1/reverse
68 | lat | lon | namedetails |
69 | 47.14122383 | 9.52169581334 | <value> |
70 Then a HTTP 200 is returned
71 And the result is valid xml
72 And the result has attributes namedetails
83 Scenario: Only one geometry can be requested
84 When sending v1/reverse
85 | lat | lon | polygon_text | polygon_svg |
86 | 47.14122383 | 9.52169581334 | 1 | 1 |
87 Then a HTTP 400 is returned
89 Scenario Outline: Illegal jsonp are not allowed
90 When sending v1/reverse with format json
91 | lat | lon | json_callback |
92 | 47.14122383 | 9.52169581334 | <data> |
93 Then a HTTP 400 is returned
102 Scenario Outline: Reverse debug mode produces valid HTML
103 Given debug output is enabled
104 When sending v1/reverse
105 | lat | lon | debug |
106 | <lat> | <lon> | 1 |
107 Then a HTTP 200 is returned
108 And the result is valid html
113 | 47.06645 | 9.56601 |
114 | 47.14081 | 9.52267 |
116 Scenario Outline: Full address display for city housenumber-level address with street
117 When sending v1/reverse with format <format>
119 | 47.1068011 | 9.52810091 |
120 Then a HTTP 200 is returned
121 And the result is valid <outformat>
122 And the result contains in field address
126 | neighbourhood | Oberdorf |
127 | village | Triesen |
128 | ISO3166-2-lvl8 | LI-09 |
129 | county | Oberland |
131 | country | Liechtenstein |
132 | country_code | li |
135 | format | outformat |
140 Scenario Outline: Results with name details
141 When sending v1/reverse with format <format>
142 | lat | lon | zoom | namedetails |
143 | 47.14052 | 9.52202 | 14 | 1 |
144 Then a HTTP 200 is returned
145 And the result is valid <outformat>
146 And the result contains in field namedetails
151 | format | outformat |
156 Scenario Outline: Results with extratags
157 When sending v1/reverse with format <format>
158 | lat | lon | zoom | extratags |
159 | 47.14052 | 9.52202 | 14 | 1 |
160 Then a HTTP 200 is returned
161 And the result is valid <outformat>
162 And the result contains in field extratags
167 | format | outformat |
172 Scenario Outline: Reverse with entrances
173 When sending v1/reverse with format <format>
174 | lat | lon | entrances | zoom |
175 | 47.24942041089678 | 9.52854573737568 | 1 | 18 |
176 Then a HTTP 200 is returned
177 And the result is valid <outformat>
178 And the result contains array field entrances where element 0 contains
179 | osm_id | type | lat | lon |
180 | 6580031131 | yes | 47.2489382 | 9.5284033 |
183 | format | outformat |
187 Scenario Outline: Unknown layers are rejected
188 When sending v1/reverse
189 | lat | lon | layer |
190 | 47.14122383 | 9.52169581334 | <layer> |
191 Then a HTTP 400 is returned
198 Scenario Outline: An empty layer parameter disables layer filtering
199 When sending v1/reverse
200 | lat | lon | layer |
201 | 47.14122383 | 9.52169581334 | <layer> |
202 Then a HTTP 200 is returned