]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/features/db/query/search_simple.feature
release 5.1.0.post12
[nominatim.git] / test / bdd / features / db / query / search_simple.feature
1 Feature: Searching of simple objects
2     Testing simple stuff
3
4     Scenario: Search for place node
5         Given the places
6           | osm | class | type    | name+name | geometry   |
7           | N1  | place | village | Foo       | 10.0 -10.0 |
8         When importing
9         And geocoding "Foo"
10         Then result 0 contains
11          | object | category | type    | centroid!wkt |
12          | N1     | place    | village | 10 -10   |
13
14     # github #1763
15     Scenario: Correct translation of highways under construction
16         Given the grid
17          | 1 |  |   |  | 2 |
18          |   |  | 9 |  |   |
19         And the places
20          | osm | class   | type         | name      | geometry |
21          | W1  | highway | construction | The build | 1,2      |
22          | N1  | amenity | cafe         | Bean      | 9        |
23         When importing
24         And geocoding "Bean"
25         Then result 0 contains in field address
26          | amenity | road |
27          | Bean    | The build |
28
29     Scenario: when missing housenumbers in search don't return a POI
30         Given the places
31          | osm | class   | type       | name        |
32          | N3  | amenity | restaurant | Wood Street |
33         And the places
34          | osm | class   | type       | name        | housenr |
35          | N20 | amenity | restaurant | Red Way     | 34      |
36         When importing
37         And geocoding "Wood Street 45"
38         Then exactly 0 results are returned
39         When geocoding "Red Way 34"
40         Then exactly 0 results are returned
41
42      Scenario: when the housenumber is missing the street is still returned
43         Given the grid
44          | 1 |  | 2 |
45         Given the places
46          | osm | class   | type        | name        | geometry |
47          | W1  | highway | residential | Wood Street | 1, 2     |
48         When importing
49         And geocoding "Wood Street"
50         Then all results contain
51          | object |
52          | W1  |
53
54      Scenario Outline: Special cased american states will be found
55         Given the grid
56          | 1 |    | 2 |
57          |   | 10 |   |
58          | 4 |    | 3 |
59         Given the places
60          | osm  | class    | type           | admin | name    | name+ref | geometry    |
61          | R1   | boundary | administrative | 4     | <state> | <ref>    | (1,2,3,4,1) |
62         Given the places
63          | osm  | class | type  | name   | geometry    |
64          | N2   | place | town  | <city> | 10          |
65          | N3   | place | city  | <city>  | country:ca  |
66         When importing
67         And geocoding "<city>, <state>"
68         Then all results contain
69          | object |
70          | N2  |
71         When geocoding "<city>, <ref>"
72          | accept-language |
73          | en |
74         Then all results contain
75          | object |
76          | N2  |
77
78      Examples:
79         | city        | state     | ref |
80         | Chicago     | Illinois  | IL  |
81         | Auburn      | Alabama   | AL  |
82         | New Orleans | Louisiana | LA  |