3 Simple tests for internal server errors and response format.
5 Scenario Outline: Testing different parameters
6 When sending search query "Hamburg"
8 | <parameter> | <value> |
9 Then at least 1 result is returned
10 When sending html search query "Hamburg"
12 | <parameter> | <value> |
13 Then at least 1 result is returned
14 When sending xml search query "Hamburg"
16 | <parameter> | <value> |
17 Then at least 1 result is returned
18 When sending json search query "Hamburg"
20 | <parameter> | <value> |
21 Then at least 1 result is returned
22 When sending jsonv2 search query "Hamburg"
24 | <parameter> | <value> |
25 Then at least 1 result is returned
26 When sending geojson search query "Hamburg"
28 | <parameter> | <value> |
29 Then at least 1 result is returned
33 | addressdetails | 1 |
34 | addressdetails | 0 |
41 | polygon_geojson | 1 |
42 | polygon_geojson | 0 |
45 | accept-language | de,en |
49 | exclude_place_ids| 385252,1234515 |
58 Scenario: Search with invalid output format
59 When sending search query "Berlin"
62 Then a HTTP 400 is returned
64 Scenario Outline: Simple Searches
65 When sending search query "<query>"
66 Then the result is valid html
67 When sending html search query "<query>"
68 Then the result is valid html
69 When sending xml search query "<query>"
70 Then the result is valid xml
71 When sending json search query "<query>"
72 Then the result is valid json
73 When sending jsonv2 search query "<query>"
74 Then the result is valid json
75 When sending geojson search query "<query>"
76 Then the result is valid geojson
80 | New York, New York |
82 | 12, Main Street, Houston |
92 Scenario: Empty XML search
93 When sending xml search query "xnznxvcx"
94 Then result header contains
96 | querystring | xnznxvcx |
98 | more_url | .*q=xnznxvcx.*format=xml |
100 Scenario: Empty XML search with special XML characters
101 When sending xml search query "xfdghn&zxn"xvbyx<vxx>cssdex"
102 Then result header contains
104 | querystring | xfdghn&zxn"xvbyx<vxx>cssdex |
106 | more_url | .*q=xfdghn%26zxn%22xvbyx%3Cvxx%3Ecssdex.*format=xml |
108 Scenario: Empty XML search with viewbox
109 When sending xml search query "xnznxvcx"
112 Then result header contains
114 | querystring | xnznxvcx |
116 | viewbox | 12,33,77,45.13 |
118 Scenario: Empty XML search with viewboxlbrt
119 When sending xml search query "xnznxvcx"
122 Then result header contains
124 | querystring | xnznxvcx |
126 | viewbox | 12,34.13,77,45 |
128 Scenario: Empty XML search with viewboxlbrt and viewbox
129 When sending xml search query "pub"
130 | viewbox | viewboxblrt |
131 | 12,33,77,45.13 | 1,2,3,4 |
132 Then result header contains
134 | querystring | pub |
136 | viewbox | 12,33,77,45.13 |
138 Scenario Outline: Empty XML search with polygon values
139 When sending xml search query "xnznxvcx"
141 | polygon | <polyval> |
142 Then result header contains
144 | polygon | <result> |
156 | true | '; delete from foobar; select ' |
158 Scenario: Empty XML search with exluded place ids
159 When sending xml search query "jghrleoxsbwjer"
160 | exclude_place_ids |
162 Then result header contains
164 | exclude_place_ids | 123,76,342565 |
166 Scenario: Empty XML search with bad exluded place ids
167 When sending xml search query "jghrleoxsbwjer"
168 | exclude_place_ids |
170 Then result header has not attributes exclude_place_ids
172 Scenario Outline: Wrapping of legal jsonp search requests
173 When sending json search query "Tokyo"
175 |json_callback | <data> |
176 Then result header contains
178 | json_func | <result> |
184 | __world | __world |
187 | d_r[$d] | d_r\[\$d\] |
189 Scenario Outline: Wrapping of illegal jsonp search requests
190 When sending json search query "Tokyo"
192 |json_callback | <data> |
193 Then a HTTP 400 is returned
202 Scenario: Ignore jsonp parameter for anything but json
203 When sending json search query "Malibu"
206 Then a HTTP 400 is returned
207 When sending xml search query "Malibu"
210 Then the result is valid xml
211 When sending html search query "Malibu"
214 Then the result is valid html
216 Scenario: Empty JSON search
217 When sending json search query "YHlERzzx"
218 Then exactly 0 results are returned
220 Scenario: Empty JSONv2 search
221 When sending jsonv2 search query "Flubb XdfESSaZx"
222 Then exactly 0 results are returned
224 Scenario: Search for non-existing coordinates
225 When sending json search query "-21.0,-33.0"
226 Then exactly 0 results are returned
228 Scenario: Country code selection is retained in more URL (#596)
229 When sending xml search query "Vaduz"
231 | pl,1,,invalid,undefined,%3Cb%3E,bo,, |
232 Then result header contains
234 | more_url | .*&countrycodes=pl%2Cbo&.* |