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