]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/api/search/structured.feature
Merge pull request #1732 from lonvia/improve-geocodejson-output
[nominatim.git] / test / bdd / api / search / structured.feature
1 @APIDB
2 Feature: Structured search queries
3     Testing correctness of results with
4     structured queries
5
6     Scenario: Country only
7         When sending json search query "" with address
8           | country |
9           | Liechtenstein |
10         Then address of result 0 is
11           | type         | value |
12           | country      | Liechtenstein |
13           | country_code | li |
14
15     Scenario: Postcode only
16         When sending json search query "" with address
17           | postalcode |
18           | 22547 |
19         Then results contain
20           | type |
21           | postcode |
22         And result addresses contain
23           | postcode |
24           | 22547 |
25
26     Scenario: Street, postcode and country
27         When sending xml search query "" with address
28           | street          | postalcode | country |
29           | Old Palace Road | GU2 7UP    | United Kingdom |
30         Then result header contains
31           | attr        | value |
32           | querystring | Old Palace Road, GU2 7UP, United Kingdom |
33
34     Scenario: Street with housenumber, city and postcode
35         When sending xml search query "" with address
36           | street             | city  | postalcode |
37           | 19 Am schrägen Weg | Vaduz | 9490       |
38         Then result addresses contain
39           | house_number | road |
40           | 19           | Am Schrägen Weg |
41
42     Scenario: Street with housenumber, city and bad postcode
43         When sending xml search query "" with address
44           | street             | city  | postalcode |
45           | 19 Am schrägen Weg | Vaduz | 9491       |
46         Then result addresses contain
47           | house_number | road |
48           | 19           | Am Schrägen Weg |
49
50     Scenario: Amenity, city
51         When sending json search query "" with address
52           | city  | amenity |
53           | Vaduz | church  |
54         Then result addresses contain
55           | country |
56           | Liechtenstein |
57         And  results contain
58           | class   | type |
59           | amenity | place_of_worship |
60
61     Scenario: gihub #176
62         When sending json search query "" with address
63           | city |
64           | Mercedes |
65         Then at least 1 result is returned