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 |
43 | polygon_geojson | 1 |
44 | polygon_geojson | 0 |
47 | accept-language | de,en |
51 | exclude_place_ids| 385252,1234515 |
60 Scenario: Search with invalid output format
61 When sending search query "Berlin"
64 Then a HTTP 400 is returned
66 Scenario Outline: Simple Searches
67 When sending search query "<query>"
68 Then the result is valid html
69 When sending html search query "<query>"
70 Then the result is valid html
71 When sending xml search query "<query>"
72 Then the result is valid xml
73 When sending json search query "<query>"
74 Then the result is valid json
75 When sending jsonv2 search query "<query>"
76 Then the result is valid json
77 When sending geojson search query "<query>"
78 Then the result is valid geojson
82 | New York, New York |
84 | 12, Main Street, Houston |
94 Scenario: Empty XML search
95 When sending xml search query "xnznxvcx"
96 Then result header contains
98 | querystring | xnznxvcx |
99 | more_url | .*q=xnznxvcx.*format=xml |
101 Scenario: Empty XML search with special XML characters
102 When sending xml search query "xfdghn&zxn"xvbyx<vxx>cssdex"
103 Then result header contains
105 | 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 |
115 | viewbox | 12,33,77,45.13 |
117 Scenario: Empty XML search with viewboxlbrt
118 When sending xml search query "xnznxvcx"
121 Then result header contains
123 | querystring | xnznxvcx |
124 | viewbox | 12,34.13,77,45 |
126 Scenario: Empty XML search with viewboxlbrt and viewbox
127 When sending xml search query "pub"
128 | viewbox | viewboxblrt |
129 | 12,33,77,45.13 | 1,2,3,4 |
130 Then result header contains
132 | querystring | pub |
133 | viewbox | 12,33,77,45.13 |
135 Scenario: Empty XML search with exluded place ids
136 When sending xml search query "jghrleoxsbwjer"
137 | exclude_place_ids |
139 Then result header contains
141 | exclude_place_ids | 123,76,342565 |
143 Scenario: Empty XML search with bad exluded place ids
144 When sending xml search query "jghrleoxsbwjer"
145 | exclude_place_ids |
147 Then result header has not attributes exclude_place_ids
149 Scenario Outline: Wrapping of legal jsonp search requests
150 When sending json search query "Tokyo"
152 |json_callback | <data> |
153 Then result header contains
155 | json_func | <result> |
161 | __world | __world |
164 | d_r[$d] | d_r\[\$d\] |
166 Scenario Outline: Wrapping of illegal jsonp search requests
167 When sending json search query "Tokyo"
169 |json_callback | <data> |
170 Then a json user error is returned
179 Scenario: Ignore jsonp parameter for anything but json
180 When sending json search query "Malibu"
183 Then a HTTP 400 is returned
184 When sending xml search query "Malibu"
187 Then the result is valid xml
188 When sending html search query "Malibu"
191 Then the result is valid html
193 Scenario: Empty JSON search
194 When sending json search query "YHlERzzx"
195 Then exactly 0 results are returned
197 Scenario: Empty JSONv2 search
198 When sending jsonv2 search query "Flubb XdfESSaZx"
199 Then exactly 0 results are returned
201 Scenario: Search for non-existing coordinates
202 When sending json search query "-21.0,-33.0"
203 Then exactly 0 results are returned
205 Scenario: Country code selection is retained in more URL (#596)
206 When sending xml search query "Vaduz"
208 | pl,1,,invalid,undefined,%3Cb%3E,bo,, |
209 Then result header contains
211 | more_url | .*&countrycodes=pl%2Cbo&.* |
213 Scenario Outline: Search with debug prints valid HTML
214 When sending html search query "<query>"
215 | extratags | addressdetails | namedetails | debug |
217 Then the result is valid html
221 | 10, Alvierweg, 9490, Vaduz |