3 Simple tests for internal server errors and response format.
5 Scenario Outline: Testing different parameters
6 When sending search query "Vaduz"
8 | <parameter> | <value> |
9 Then at least 1 result is returned
10 When sending xml search query "Vaduz"
12 | <parameter> | <value> |
13 Then at least 1 result is returned
14 When sending json search query "Vaduz"
16 | <parameter> | <value> |
17 Then at least 1 result is returned
18 When sending jsonv2 search query "Vaduz"
20 | <parameter> | <value> |
21 Then at least 1 result is returned
22 When sending geojson search query "Vaduz"
24 | <parameter> | <value> |
25 Then at least 1 result is returned
26 When sending geocodejson search query "Vaduz"
28 | <parameter> | <value> |
29 Then at least 1 result is returned
33 | addressdetails | 1 |
34 | addressdetails | 0 |
39 | polygon_geojson | 1 |
40 | polygon_geojson | 0 |
43 | accept-language | de,en |
47 | exclude_place_ids| 385252,1234515 |
56 Scenario: Search with invalid output format
57 When sending search query "Berlin"
60 Then a HTTP 400 is returned
62 Scenario Outline: Simple Searches
63 When sending search query "<query>"
64 Then the result is valid json
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
71 When sending geojson search query "<query>"
72 Then the result is valid geojson
76 | New York, New York |
78 | 12, Main Street, Houston |
88 Scenario: Empty XML search
89 When sending xml search query "xnznxvcx"
90 Then result header contains
92 | querystring | xnznxvcx |
93 | more_url | .*q=xnznxvcx.*format=xml |
95 Scenario: Empty XML search with special XML characters
96 When sending xml search query "xfdghn&zxn"xvbyx<vxx>cssdex"
97 Then result header contains
99 | 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 |
109 | viewbox | 12,33,77,45.13 |
111 Scenario: Empty XML search with viewboxlbrt
112 When sending xml search query "xnznxvcx"
115 Then result header contains
117 | querystring | xnznxvcx |
118 | viewbox | 12,34.13,77,45 |
120 Scenario: Empty XML search with viewboxlbrt and viewbox
121 When sending xml search query "pub"
122 | viewbox | viewboxblrt |
123 | 12,33,77,45.13 | 1,2,3,4 |
124 Then result header contains
126 | querystring | pub |
127 | viewbox | 12,33,77,45.13 |
129 Scenario: Empty XML search with exluded place ids
130 When sending xml search query "jghrleoxsbwjer"
131 | exclude_place_ids |
133 Then result header contains
135 | exclude_place_ids | 123,76,342565 |
137 Scenario: Empty XML search with bad exluded place ids
138 When sending xml search query "jghrleoxsbwjer"
139 | exclude_place_ids |
141 Then result header has not attributes exclude_place_ids
143 Scenario Outline: Wrapping of legal jsonp search requests
144 When sending json search query "Tokyo"
146 |json_callback | <data> |
147 Then result header contains
149 | json_func | <result> |
155 | __world | __world |
158 | d_r[$d] | d_r\[\$d\] |
160 Scenario Outline: Wrapping of illegal jsonp search requests
161 When sending json search query "Tokyo"
163 |json_callback | <data> |
164 Then a json user error is returned
173 Scenario: Ignore jsonp parameter for anything but json
174 When sending json search query "Malibu"
177 Then a HTTP 400 is returned
178 When sending xml search query "Malibu"
181 Then the result is valid xml
183 Scenario: Empty JSON search
184 When sending json search query "YHlERzzx"
185 Then exactly 0 results are returned
187 Scenario: Empty JSONv2 search
188 When sending jsonv2 search query "Flubb XdfESSaZx"
189 Then exactly 0 results are returned
191 Scenario: Search for non-existing coordinates
192 When sending json search query "-21.0,-33.0"
193 Then exactly 0 results are returned
195 Scenario: Country code selection is retained in more URL (#596)
196 When sending xml search query "Vaduz"
198 | pl,1,,invalid,undefined,%3Cb%3E,bo,, |
199 Then result header contains
201 | more_url | .*&countrycodes=pl%2Cbo&.* |