]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/api/search/postcode.feature
disable ZIP5+ test for Python frontend
[nominatim.git] / test / bdd / api / search / postcode.feature
1 @SQLITE
2 @APIDB
3 Feature: Searches with postcodes
4     Various searches involving postcodes
5
6     @v1-api-php-only
7     Scenario: US 5+4 ZIP codes are shortened to 5 ZIP codes if not found
8         When sending json search query "36067 1111, us" with address
9         Then result addresses contain
10             | postcode |
11             | 36067    |
12         And results contain
13             | type     |
14             | postcode |
15
16     Scenario: Postcode search with address
17         When sending json search query "9486, mauren"
18         Then at least 1 result is returned
19
20     Scenario: Postcode search with country
21         When sending json search query "9486, li" with address
22         Then result addresses contain
23             | country_code |
24             | li           |
25
26     Scenario: Postcode search with country code restriction
27         When sending json search query "9490" with address
28             | countrycodes |
29             | li |
30         Then result addresses contain
31             | country_code |
32             | li           |
33
34     Scenario: Postcode search with bounded viewbox restriction
35         When sending json search query "9486" with address
36           | bounded | viewbox |
37           | 1       | 9.55,47.20,9.58,47.22 |
38         Then result addresses contain
39             | postcode |
40             | 9486     |
41         When sending json search query "9486" with address
42           | bounded | viewbox                 |
43           | 1       | 5.00,20.00,6.00,21.00 |
44         Then exactly 0 results are returned
45
46     Scenario: Postcode search with structured query
47         When sending json search query "" with address
48             | postalcode | country |
49             | 9490       | li |
50         Then result addresses contain
51             | country_code | postcode |
52             | li           | 9490     |