2 Feature: Search queries
3 Testing different queries and parameters
5 Scenario: Simple XML search
6 When sending xml search query "Schaan"
7 Then result 0 has attributes place_id,osm_type,osm_id
8 And result 0 has attributes place_rank,boundingbox
9 And result 0 has attributes lat,lon,display_name
10 And result 0 has attributes class,type,importance,icon
11 And result 0 has not attributes address
12 And result 0 has bounding box in 46.5,47.5,9,10
14 Scenario: Simple JSON search
15 When sending json search query "Vaduz"
16 Then result 0 has attributes place_id,licence,icon,class,type
17 And result 0 has attributes osm_type,osm_id,boundingbox
18 And result 0 has attributes lat,lon,display_name,importance
19 And result 0 has not attributes address
20 And result 0 has bounding box in 46.5,47.5,9,10
22 Scenario: JSON search with addressdetails
23 When sending json search query "Montevideo" with address
24 Then address of result 0 is
27 | state | Montevideo |
31 Scenario: XML search with addressdetails
32 When sending xml search query "Aleg" with address
35 Then address of result 0 is
39 | country | Mauritania |
42 Scenario: coordinate search with addressdetails
43 When sending json search query "14.271104294939,107.69828796387"
48 | Plei Ya RĂȘ, Kon Tum province, Vietnam |
50 Scenario: Address details with unknown class types
51 When sending json search query "Hundeauslauf, Hamburg" with address
54 | 0 | leisure | dog_park |
55 And result addresses contain
58 And address of result 0 has no types leisure,dog_park
60 Scenario: Disabling deduplication
61 When sending json search query "Sievekingsallee, Hamburg"
62 Then there are no duplicates
63 When sending json search query "Sievekingsallee, Hamburg"
66 Then there are duplicates
68 Scenario: Search with bounded viewbox in right area
69 When sending json search query "bar" with address
71 | 1 | -56.16786,-34.84061,-56.12525,-34.86526 |
72 Then result addresses contain
76 Scenario: Search with bounded viewboxlbrt in right area
77 When sending json search query "bar" with address
78 | bounded | viewboxlbrt |
79 | 1 | -56.16786,-34.86526,-56.12525,-34.84061 |
80 Then result addresses contain
84 Scenario: No POI search with unbounded viewbox
85 When sending json search query "restaurant"
87 | 9.93027,53.61634,10.10073,53.54500 |
90 | ^[^,]*[Rr]estaurant.* |
92 Scenario: bounded search remains within viewbox, even with no results
93 When sending json search query "restaurant"
95 | 1 | 43.5403125,-5.6563282,43.54285,-5.662003 |
96 Then less than 1 result is returned
98 Scenario: bounded search remains within viewbox with results
99 When sending json search query "restaurant"
100 | bounded | viewbox |
101 | 1 | 9.93027,53.61634,10.10073,53.54500 |
102 Then result has bounding box in 53.54500,53.61634,9.93027,10.10073
104 Scenario: Prefer results within viewbox
105 When sending json search query "25 de Mayo" with address
108 Then result addresses contain
111 When sending json search query "25 de Mayo" with address
112 | accept-language | viewbox |
113 | en | -56.35879,-34.18330,-56.31618,-34.20815 |
114 Then result addresses contain
118 Scenario: viewboxes cannot be points
119 When sending json search query "foo"
121 | 1.01,34.6,1.01,34.6 |
122 Then a HTTP 400 is returned
124 Scenario Outline: viewbox must have four coordinate numbers
125 When sending json search query "foo"
128 Then a HTTP 400 is returned
135 | 23.1,-6,0.11,44.2,9.1 |
137 Scenario Outline: viewboxlbrt must have four coordinate numbers
138 When sending json search query "foo"
141 Then a HTTP 400 is returned
148 | 23.1,-6,0.11,44.2,9.1 |
150 Scenario: Overly large limit number for search results
151 When sending json search query "restaurant"
154 Then at most 50 results are returned
156 Scenario: Limit number of search results
157 When sending json search query "restaurant"
160 Then exactly 4 results are returned
162 Scenario: Restrict to feature type country
163 When sending xml search query "Uruguay"
167 When sending xml search query "Uruguay"
174 Scenario: Restrict to feature type state
175 When sending xml search query "Dakota"
179 When sending xml search query "Dakota"
186 Scenario: Restrict to feature type city
187 When sending xml search query "vaduz"
191 When sending xml search query "vaduz"
198 Scenario: Restrict to feature type settlement
199 When sending json search query "Burg"
203 When sending json search query "Burg"
208 | boundary | administrative |
210 Scenario Outline: Search with polygon threshold (json)
211 When sending json search query "switzerland"
212 | polygon_geojson | polygon_threshold |
214 Then at least 1 result is returned
215 And result 0 has attributes geojson
224 Scenario Outline: Search with polygon threshold (xml)
225 When sending xml search query "switzerland"
226 | polygon_geojson | polygon_threshold |
228 Then at least 1 result is returned
229 And result 0 has attributes geojson
238 Scenario Outline: Search with invalid polygon threshold (xml)
239 When sending xml search query "switzerland"
240 | polygon_geojson | polygon_threshold |
242 Then a HTTP 400 is returned
250 Scenario Outline: Search with extratags
251 When sending <format> search query "Hauptstr"
254 Then result has attributes extratags
262 Scenario Outline: Search with namedetails
263 When sending <format> search query "Hauptstr"
266 Then result has attributes namedetails
274 Scenario Outline: Search result with contains TEXT geometry
275 When sending <format> search query "Highmore"
278 Then result has attributes <response_attribute>
281 | format | response_attribute |
286 Scenario Outline: Search result contains polygon-as-points geometry
287 When sending <format> search query "Highmore"
290 Then result has attributes <response_attribute>
293 | format | response_attribute |
294 | xml | polygonpoints |
295 | json | polygonpoints |
296 | jsonv2 | polygonpoints |
298 Scenario Outline: Search result contains SVG geometry
299 When sending <format> search query "Highmore"
302 Then result has attributes <response_attribute>
305 | format | response_attribute |
310 Scenario Outline: Search result contains KML geometry
311 When sending <format> search query "Highmore"
314 Then result has attributes <response_attribute>
317 | format | response_attribute |
322 Scenario Outline: Search result contains GEOJSON geometry
323 When sending <format> search query "Highmore"
326 Then result has attributes <response_attribute>
329 | format | response_attribute |
334 Scenario: Search along a route
335 When sending json search query "restaurant" with address
336 | bounded | routewidth | route |
337 | 1 | 0.1 | -103.23255,44.08198,-103.22516,44.08079 |
338 Then result addresses contain