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
30 When sending geocodejson search query "Hamburg"
32 | <parameter> | <value> |
33 Then at least 1 result is returned
37 | addressdetails | 1 |
38 | addressdetails | 0 |
45 | polygon_geojson | 1 |
46 | polygon_geojson | 0 |
49 | accept-language | de,en |
53 | exclude_place_ids| 385252,1234515 |
62 Scenario: Search with invalid output format
63 When sending search query "Berlin"
66 Then a HTTP 400 is returned
68 Scenario Outline: Simple Searches
69 When sending search query "<query>"
70 Then the result is valid html
71 When sending html search query "<query>"
72 Then the result is valid html
73 When sending xml search query "<query>"
74 Then the result is valid xml
75 When sending json search query "<query>"
76 Then the result is valid json
77 When sending jsonv2 search query "<query>"
78 Then the result is valid json
79 When sending geojson search query "<query>"
80 Then the result is valid geojson
84 | New York, New York |
86 | 12, Main Street, Houston |
96 Scenario: Empty XML search
97 When sending xml search query "xnznxvcx"
98 Then result header contains
100 | querystring | xnznxvcx |
102 | more_url | .*q=xnznxvcx.*format=xml |
104 Scenario: Empty XML search with special XML characters
105 When sending xml search query "xfdghn&zxn"xvbyx<vxx>cssdex"
106 Then result header contains
108 | querystring | xfdghn&zxn"xvbyx<vxx>cssdex |
110 | more_url | .*q=xfdghn%26zxn%22xvbyx%3Cvxx%3Ecssdex.*format=xml |
112 Scenario: Empty XML search with viewbox
113 When sending xml search query "xnznxvcx"
116 Then result header contains
118 | querystring | xnznxvcx |
120 | viewbox | 12,33,77,45.13 |
122 Scenario: Empty XML search with viewboxlbrt
123 When sending xml search query "xnznxvcx"
126 Then result header contains
128 | querystring | xnznxvcx |
130 | viewbox | 12,34.13,77,45 |
132 Scenario: Empty XML search with viewboxlbrt and viewbox
133 When sending xml search query "pub"
134 | viewbox | viewboxblrt |
135 | 12,33,77,45.13 | 1,2,3,4 |
136 Then result header contains
138 | querystring | pub |
140 | viewbox | 12,33,77,45.13 |
142 Scenario Outline: Empty XML search with polygon values
143 When sending xml search query "xnznxvcx"
145 | polygon | <polyval> |
146 Then result header contains
148 | polygon | <result> |
160 | true | '; delete from foobar; select ' |
162 Scenario: Empty XML search with exluded place ids
163 When sending xml search query "jghrleoxsbwjer"
164 | exclude_place_ids |
166 Then result header contains
168 | exclude_place_ids | 123,76,342565 |
170 Scenario: Empty XML search with bad exluded place ids
171 When sending xml search query "jghrleoxsbwjer"
172 | exclude_place_ids |
174 Then result header has not attributes exclude_place_ids
176 Scenario Outline: Wrapping of legal jsonp search requests
177 When sending json search query "Tokyo"
179 |json_callback | <data> |
180 Then result header contains
182 | json_func | <result> |
188 | __world | __world |
191 | d_r[$d] | d_r\[\$d\] |
193 Scenario Outline: Wrapping of illegal jsonp search requests
194 When sending json search query "Tokyo"
196 |json_callback | <data> |
197 Then a json user error is returned
206 Scenario: Ignore jsonp parameter for anything but json
207 When sending json search query "Malibu"
210 Then a HTTP 400 is returned
211 When sending xml search query "Malibu"
214 Then the result is valid xml
215 When sending html search query "Malibu"
218 Then the result is valid html
220 Scenario: Empty JSON search
221 When sending json search query "YHlERzzx"
222 Then exactly 0 results are returned
224 Scenario: Empty JSONv2 search
225 When sending jsonv2 search query "Flubb XdfESSaZx"
226 Then exactly 0 results are returned
228 Scenario: Search for non-existing coordinates
229 When sending json search query "-21.0,-33.0"
230 Then exactly 0 results are returned
232 Scenario: Country code selection is retained in more URL (#596)
233 When sending xml search query "Vaduz"
235 | pl,1,,invalid,undefined,%3Cb%3E,bo,, |
236 Then result header contains
238 | more_url | .*&countrycodes=pl%2Cbo&.* |
240 Scenario Outline: Search with debug prints valid HTML
241 When sending html search query "<query>"
242 | extratags | addressdetails | namedetails | debug |
244 Then the result is valid html
248 | 10, Alvierweg, 9490, Vaduz |