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
29 | addressdetails | 1 |
30 | addressdetails | 0 |
37 | polygon_geojson | 1 |
38 | polygon_geojson | 0 |
41 | accept-language | de,en |
45 | exclude_place_ids| 385252,1234515 |
54 Scenario: Search with invalid output format
55 When sending search query "Berlin"
58 Then a HTTP 400 is returned
60 Scenario Outline: Simple Searches
61 When sending search query "<query>"
62 Then the result is valid html
63 When sending html search query "<query>"
64 Then the result is valid html
65 When sending xml search query "<query>"
66 Then the result is valid xml
67 When sending json search query "<query>"
68 Then the result is valid json
69 When sending jsonv2 search query "<query>"
70 Then the result is valid json
74 | New York, New York |
76 | 12, Main Street, Houston |
86 Scenario: Empty XML search
87 When sending xml search query "xnznxvcx"
88 Then result header contains
90 | querystring | xnznxvcx |
92 | more_url | .*q=xnznxvcx.*format=xml |
94 Scenario: Empty XML search with special XML characters
95 When sending xml search query "xfdghn&zxn"xvbyx<vxx>cssdex"
96 Then result header contains
98 | querystring | xfdghn&zxn"xvbyx<vxx>cssdex |
100 | more_url | .*q=xfdghn%26zxn%22xvbyx%3Cvxx%3Ecssdex.*format=xml |
102 Scenario: Empty XML search with viewbox
103 When sending xml search query "xnznxvcx"
106 Then result header contains
108 | querystring | xnznxvcx |
110 | viewbox | 12,33,77,45.13 |
112 Scenario: Empty XML search with viewboxlbrt
113 When sending xml search query "xnznxvcx"
116 Then result header contains
118 | querystring | xnznxvcx |
120 | viewbox | 12,45,77,34.13 |
122 Scenario: Empty XML search with viewboxlbrt and viewbox
123 When sending xml search query "pub"
124 | viewbox | viewboxblrt |
125 | 12,45.13,77,33 | 1,2,3,4 |
126 Then result header contains
128 | querystring | pub |
130 | viewbox | 12,33,77,45.13 |
132 Scenario Outline: Empty XML search with polygon values
133 When sending xml search query "xnznxvcx"
135 | polygon | <polyval> |
136 Then result header contains
138 | polygon | <result> |
150 | true | '; delete from foobar; select ' |
152 Scenario: Empty XML search with exluded place ids
153 When sending xml search query "jghrleoxsbwjer"
154 | exclude_place_ids |
156 Then result header contains
158 | exclude_place_ids | 123,76,342565 |
160 Scenario: Empty XML search with bad exluded place ids
161 When sending xml search query "jghrleoxsbwjer"
162 | exclude_place_ids |
164 Then result header has not attributes exclude_place_ids
166 Scenario Outline: Wrapping of legal jsonp search requests
167 When sending json search query "Tokyo"
169 |json_callback | <data> |
170 Then result header contains
172 | json_func | <result> |
178 | __world | __world |
181 | d_r[$d] | d_r\[\$d\] |
183 Scenario Outline: Wrapping of illegal jsonp search requests
184 When sending json search query "Tokyo"
186 |json_callback | <data> |
187 Then a HTTP 400 is returned
196 Scenario: Ignore jsonp parameter for anything but json
197 When sending json search query "Malibu"
200 Then a HTTP 400 is returned
201 When sending xml search query "Malibu"
204 Then the result is valid xml
205 When sending html search query "Malibu"
208 Then the result is valid html
210 Scenario: Empty JSON search
211 When sending json search query "YHlERzzx"
212 Then exactly 0 results are returned
214 Scenario: Empty JSONv2 search
215 When sending jsonv2 search query "Flubb XdfESSaZx"
216 Then exactly 0 results are returned
218 Scenario: Search for non-existing coordinates
219 When sending json search query "-21.0,-33.0"
220 Then exactly 0 results are returned
222 Scenario: Country code selection is retained in more URL (#596)
223 When sending xml search query "Vaduz"
225 | pl,1,,invalid,undefined,%3Cb%3E,bo,, |
226 Then result header contains
228 | more_url | .*&countrycodes=pl%2Cbo&.* |