]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/db/query/search_simple.feature
Merge pull request #2359 from lonvia/switch-bdd-tests-to-api-search
[nominatim.git] / test / bdd / db / query / search_simple.feature
1 @DB
2 Feature: Searching of simple objects
3     Testing simple stuff
4
5     Scenario: Search for place node
6         Given the places
7           | osm | class | type    | name+name | geometry   |
8           | N1  | place | village | Foo       | 10.0 -10.0 |
9         When importing
10         And sending search query "Foo"
11         Then results contain
12          | ID | osm | category | type    | centroid |
13          | 0  | N1  | place    | village | 10 -10   |
14
15      Scenario: Updating postcode in postcode boundaries without ref
16         Given the places
17           | osm | class    | type        | postcode | geometry |
18           | R1  | boundary | postal_code | 12345    | poly-area:1.0 |
19         When importing
20         And sending search query "12345"
21         Then results contain
22          | ID | osm |
23          | 0  | R1 |
24         When updating places
25           | osm | class    | type        | postcode | geometry |
26           | R1  | boundary | postal_code | 54321    | poly-area:1.0 |
27         And sending search query "12345"
28         Then result 0 has not attributes osm_type
29         When sending search query "54321"
30         Then results contain
31          | ID | osm |
32          | 0  | R1 |
33
34     # github #1763
35     Scenario: Correct translation of highways under construction
36         Given the grid
37          | 1 |  |   |  | 2 |
38          |   |  | 9 |  |   |
39         And the places
40          | osm | class   | type         | name      | geometry |
41          | W1  | highway | construction | The build | 1,2      |
42          | N1  | amenity | cafe         | Bean      | 9        |
43         When importing
44         And sending json search query "Bean" with address
45         Then result addresses contain
46          | amenity | road |
47          | Bean    | The build |