]> git.openstreetmap.org Git - nominatim.git/blob - tests/features/api/search.feature
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / tests / features / api / search.feature
1 Feature: Search queries
2     Testing correctness of results
3
4     Scenario: UK House number search
5         When sending json search query "27 Thoresby Road, Broxtowe" with address
6         Then address of result 0 contains
7           | type         | value
8           | house_number | 27
9           | road         | Thoresby Road
10           | city         | Broxtowe
11           | state        | England
12           | country      | U.*K.*
13           | country_code | gb
14
15
16     Scenario: House number search for non-street address
17         Given the request parameters
18           | accept-language
19           | en
20         When sending json search query "4 Pomocnia, Pokrzywnica, Poland" with address
21         Then address of result 0 contains
22           | type         | value
23           | house_number | 4
24           | county       | gmina Pokrzywnica
25           | state        | Masovian Voivodeship
26           | postcode     | 06-121
27           | country      | Poland
28           | country_code | pl
29         Then address of result 0 does not contain road
30
31     Scenario: House number interpolation even
32         Given the request parameters
33           | accept-language
34           | en
35         When sending json search query "140 rue Don Bosco, Saguenay" with address
36         Then address of result 0 contains
37           | type         | value
38           | house_number | 140
39           | road         | [Rr]ue Don Bosco
40           | city         | .*Saguenay
41           | state        | Quebec
42           | country      | Canada
43           | country_code | ca
44
45     Scenario: House number interpolation odd
46         Given the request parameters
47           | accept-language
48           | en
49         When sending json search query "141 rue Don Bosco, Saguenay" with address
50         Then address of result 0 contains
51           | type         | value
52           | house_number | 141
53           | road         | [rR]ue Don Bosco
54           | city         | .*Saguenay
55           | state        | Quebec
56           | country      | Canada
57           | country_code | ca
58
59     @Tiger
60     Scenario: TIGER house number
61         When sending json search query "3 West Victory Way, Craig"
62         Then results contain
63          | osm_type
64          | tiger
65
66     @Tiger
67     Scenario: TIGER house number (road fallback)
68         When sending json search query "3030 West Victory Way, Craig"
69         Then results contain
70          | osm_type
71          | way
72
73     Scenario: Expansion of Illinois
74         Given the request parameters
75           | accept-language
76           | en
77         When sending json search query "il, us"
78         Then results contain
79           | ID | display_name
80           | 0  | Illinois.*
81
82     Scenario: Search with class-type feature
83         When sending jsonv2 search query "Hotel California"
84         Then results contain
85           | place_rank
86           | 30