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 | 0 |
36 | polygon_geojson | 0 |
38 | accept-language | de,en |
42 | exclude_place_ids| 385252,1234515 |
49 Scenario: Search with invalid output format
50 When sending search query "Berlin"
53 Then a HTTP 400 is returned
55 Scenario Outline: Simple Searches
56 When sending search query "<query>"
57 Then the result is valid json
58 When sending xml search query "<query>"
59 Then the result is valid xml
60 When sending json search query "<query>"
61 Then the result is valid json
62 When sending jsonv2 search query "<query>"
63 Then the result is valid json
64 When sending geojson search query "<query>"
65 Then the result is valid geojson
69 | New York, New York |
71 | 12, Main Street, Houston |
81 Scenario: Empty XML search
82 When sending xml search query "xnznxvcx"
83 Then result header contains
85 | querystring | xnznxvcx |
86 | more_url | .*q=xnznxvcx.*format=xml |
88 Scenario: Empty XML search with special XML characters
89 When sending xml search query "xfdghn&zxn"xvbyx<vxx>cssdex"
90 Then result header contains
92 | querystring | xfdghn&zxn"xvbyx<vxx>cssdex |
93 | more_url | .*q=xfdghn%26zxn%22xvbyx%3Cvxx%3Ecssdex.*format=xml |
95 Scenario: Empty XML search with viewbox
96 When sending xml search query "xnznxvcx"
99 Then result header contains
101 | querystring | xnznxvcx |
102 | viewbox | 12,33,77,45.13 |
104 Scenario: Empty XML search with viewboxlbrt
105 When sending xml search query "xnznxvcx"
108 Then result header contains
110 | querystring | xnznxvcx |
111 | viewbox | 12,34.13,77,45 |
113 Scenario: Empty XML search with viewboxlbrt and viewbox
114 When sending xml search query "pub"
115 | viewbox | viewboxblrt |
116 | 12,33,77,45.13 | 1,2,3,4 |
117 Then result header contains
119 | querystring | pub |
120 | viewbox | 12,33,77,45.13 |
122 Scenario: Empty XML search with exluded place ids
123 When sending xml search query "jghrleoxsbwjer"
124 | exclude_place_ids |
126 Then result header contains
128 | exclude_place_ids | 123,76,342565 |
130 Scenario: Empty XML search with bad exluded place ids
131 When sending xml search query "jghrleoxsbwjer"
132 | exclude_place_ids |
134 Then result header has not attributes exclude_place_ids
136 Scenario Outline: Wrapping of legal jsonp search requests
137 When sending json search query "Tokyo"
139 |json_callback | <data> |
140 Then result header contains
142 | json_func | <result> |
148 | __world | __world |
150 Scenario Outline: Wrapping of illegal jsonp search requests
151 When sending json search query "Tokyo"
153 |json_callback | <data> |
154 Then a json user error is returned
163 Scenario: Ignore jsonp parameter for anything but json
164 When sending json search query "Malibu"
167 Then a HTTP 400 is returned
168 When sending xml search query "Malibu"
171 Then the result is valid xml
173 Scenario Outline: Empty search
174 When sending <format> search query "YHlERzzx"
175 Then exactly 0 results are returned
184 Scenario: Search for non-existing coordinates
185 When sending json search query "-21.0,-33.0"
186 Then exactly 0 results are returned
188 Scenario: Country code selection is retained in more URL (#596)
189 When sending xml search query "Vaduz"
191 | pl,1,,invalid,undefined,%3Cb%3E,bo,, |
192 Then result header contains
194 | more_url | .*&countrycodes=pl%2Cbo&.* |
196 Scenario Outline: Search debug output does not return errors
197 When sending debug search query "<query>"
198 Then a HTTP 200 is returned
205 | Landstr 27 Steinort, Triesenberg, 9495 |
207 | restaurant in triesen |