4 Simple tests for internal server errors and response format.
6 Scenario Outline: Testing different parameters
7 When sending search query "Vaduz"
9 | <parameter> | <value> |
10 Then at least 1 result is returned
11 When sending xml search query "Vaduz"
13 | <parameter> | <value> |
14 Then at least 1 result is returned
15 When sending json search query "Vaduz"
17 | <parameter> | <value> |
18 Then at least 1 result is returned
19 When sending jsonv2 search query "Vaduz"
21 | <parameter> | <value> |
22 Then at least 1 result is returned
23 When sending geojson search query "Vaduz"
25 | <parameter> | <value> |
26 Then at least 1 result is returned
27 When sending geocodejson search query "Vaduz"
29 | <parameter> | <value> |
30 Then at least 1 result is returned
34 | addressdetails | 0 |
37 | polygon_geojson | 0 |
39 | accept-language | de,en |
43 | exclude_place_ids| 385252,1234515 |
50 Scenario: Search with invalid output format
51 When sending search query "Berlin"
54 Then a HTTP 400 is returned
56 Scenario Outline: Simple Searches
57 When sending search query "<query>"
58 Then the result is valid json
59 When sending xml search query "<query>"
60 Then the result is valid xml
61 When sending json search query "<query>"
62 Then the result is valid json
63 When sending jsonv2 search query "<query>"
64 Then the result is valid json
65 When sending geojson search query "<query>"
66 Then the result is valid geojson
70 | New York, New York |
72 | 12, Main Street, Houston |
82 Scenario: Empty XML search
83 When sending xml search query "xnznxvcx"
84 Then result header contains
86 | querystring | xnznxvcx |
87 | more_url | .*q=xnznxvcx.*format=xml |
89 Scenario: Empty XML search with special XML characters
90 When sending xml search query "xfdghn&zxn"xvbyx<vxx>cssdex"
91 Then result header contains
93 | querystring | xfdghn&zxn"xvbyx<vxx>cssdex |
94 | more_url | .*q=xfdghn%26zxn%22xvbyx%3Cvxx%3Ecssdex.*format=xml |
96 Scenario: Empty XML search with viewbox
97 When sending xml search query "xnznxvcx"
100 Then result header contains
102 | querystring | xnznxvcx |
103 | viewbox | 12,33,77,45.13 |
105 Scenario: Empty XML search with viewboxlbrt
106 When sending xml search query "xnznxvcx"
109 Then result header contains
111 | querystring | xnznxvcx |
112 | viewbox | 12,34.13,77,45 |
114 Scenario: Empty XML search with viewboxlbrt and viewbox
115 When sending xml search query "pub"
116 | viewbox | viewboxblrt |
117 | 12,33,77,45.13 | 1,2,3,4 |
118 Then result header contains
120 | querystring | pub |
121 | viewbox | 12,33,77,45.13 |
123 Scenario: Empty XML search with excluded place ids
124 When sending xml search query "jghrleoxsbwjer"
125 | exclude_place_ids |
127 Then result header contains
129 | exclude_place_ids | 123,76,342565 |
131 Scenario: Empty XML search with bad excluded place ids
132 When sending xml search query "jghrleoxsbwjer"
133 | exclude_place_ids |
135 Then result header has not attributes exclude_place_ids
137 Scenario Outline: Wrapping of legal jsonp search requests
138 When sending json search query "Tokyo"
140 |json_callback | <data> |
141 Then result header contains
143 | json_func | <result> |
149 | __world | __world |
151 Scenario Outline: Wrapping of illegal jsonp search requests
152 When sending json search query "Tokyo"
154 |json_callback | <data> |
155 Then a json user error is returned
164 Scenario: Ignore jsonp parameter for anything but json
165 When sending json search query "Malibu"
168 Then a HTTP 400 is returned
169 When sending xml search query "Malibu"
172 Then the result is valid xml
174 Scenario Outline: Empty search
175 When sending <format> search query "YHlERzzx"
176 Then exactly 0 results are returned
185 Scenario: Search for non-existing coordinates
186 When sending json search query "-21.0,-33.0"
187 Then exactly 0 results are returned
189 Scenario: Country code selection is retained in more URL (#596)
190 When sending xml search query "Vaduz"
192 | pl,1,,invalid,undefined,%3Cb%3E,bo,, |
193 Then result header contains
195 | more_url | .*&countrycodes=pl%2Cbo&.* |
197 Scenario Outline: Search debug output does not return errors
198 When sending debug search query "<query>"
199 Then a HTTP 200 is returned
206 | Landstr 27 Steinort, Triesenberg, 9495 |
208 | restaurant in triesen |