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