]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/features/db/query/search_simple.feature
release 5.1.0.post8
[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 all results contain
41          | object |
42          | N20 |
43
44      Scenario: when the housenumber is missing the street is still returned
45         Given the grid
46          | 1 |  | 2 |
47         Given the places
48          | osm | class   | type        | name        | geometry |
49          | W1  | highway | residential | Wood Street | 1, 2     |
50         When importing
51         And geocoding "Wood Street"
52         Then all results contain
53          | object |
54          | W1  |
55
56      Scenario Outline: Special cased american states will be found
57         Given the grid
58          | 1 |    | 2 |
59          |   | 10 |   |
60          | 4 |    | 3 |
61         Given the places
62          | osm  | class    | type           | admin | name    | name+ref | geometry    |
63          | R1   | boundary | administrative | 4     | <state> | <ref>    | (1,2,3,4,1) |
64         Given the places
65          | osm  | class | type  | name   | geometry    |
66          | N2   | place | town  | <city> | 10          |
67          | N3   | place | city  | <city>  | country:ca  |
68         When importing
69         And geocoding "<city>, <state>"
70         Then all results contain
71          | object |
72          | N2  |
73         When geocoding "<city>, <ref>"
74          | accept-language |
75          | en |
76         Then all results contain
77          | object |
78          | N2  |
79
80      Examples:
81         | city        | state     | ref |
82         | Chicago     | Illinois  | IL  |
83         | Auburn      | Alabama   | AL  |
84         | New Orleans | Louisiana | LA  |