]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/api/search/queries.feature
more API tests for code coverage
[nominatim.git] / test / bdd / api / search / queries.feature
1 @APIDB
2 Feature: Search queries
3     Generic search result correctness
4
5     Scenario: House number search for non-street address
6         When sending json search query "2 Steinwald, Austria" with address
7           | accept-language |
8           | en |
9         Then address of result 0 is
10           | type         | value |
11           | house_number | 2 |
12           | hamlet       | Steinwald |
13           | postcode     | 6811 |
14           | country      | Austria |
15           | country_code | at |
16
17     Scenario: House number interpolation even
18         When sending json search query "Schellingstr 86, Hamburg" with address
19           | accept-language |
20           | de |
21         Then address of result 0 is
22           | type         | value |
23           | house_number | 86 |
24           | road         | Schellingstraße |
25           | suburb       | Eilbek |
26           | postcode     | 22089 |
27           | city_district | Wandsbek |
28           | state        | Hamburg |
29           | country      | Deutschland |
30           | country_code | de |
31
32     Scenario: House number interpolation odd
33         When sending json search query "Schellingstr 73, Hamburg" with address
34           | accept-language |
35           | de |
36         Then address of result 0 is
37           | type         | value |
38           | house_number | 73 |
39           | road         | Schellingstraße |
40           | suburb       | Eilbek |
41           | postcode     | 22089 |
42           | city_district | Wandsbek |
43           | state        | Hamburg |
44           | country      | Deutschland |
45           | country_code | de |
46
47     @Tiger
48     Scenario: TIGER house number
49         When sending json search query "323 22nd Street Southwest, Huron"
50         Then results contain
51          | osm_type |
52          | way |
53
54     Scenario: Search with class-type feature
55         When sending jsonv2 search query "Hotel in California"
56         Then results contain
57           | place_rank |
58           | 30 |
59
60     Scenario: Search with specific amenity
61         When sending json search query "[restaurant] Vaduz" with address
62         Then result addresses contain
63           | country |
64           | Liechtenstein |
65         And  results contain
66           | class   | type |
67           | amenity | restaurant |
68
69     # https://trac.openstreetmap.org/ticket/5094
70     Scenario: housenumbers are ordered by complete match first
71         When sending json search query "6395 geminis, montevideo" with address
72         Then result addresses contain
73           | ID | house_number |
74           | 0  | 6395 |
75           | 1  | 6395 BIS |
76