]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/features/db/update/country.feature
when rematching only distinguish between perfect, somewhat and bad match
[nominatim.git] / test / bdd / features / db / update / country.feature
1 Feature: Country handling
2     Tests for update of country information
3
4     Background:
5         Given the 1.0 grid with origin DE
6             | 1 |    | 2 |
7             |   | 10 |   |
8             | 4 |    | 3 |
9
10     Scenario: When country names are changed old ones are no longer searchable
11         Given the places
12             | osm | class    | type           | admin | name+name:xy | country | geometry |
13             | R1  | boundary | administrative | 2     | Loudou       | de      | (1,2,3,4,1) |
14         Given the places
15             | osm | class    | type          | name  |
16             | N10 | place    | town          | Wenig |
17         When importing
18         When geocoding "Wenig, Loudou"
19         Then all results contain
20             | object |
21             | N10 |
22         When updating places
23             | osm | class    | type           | admin | name+name:xy | country | geometry |
24             | R1  | boundary | administrative | 2     | Germany      | de      | (1,2,3,4,1) |
25         When geocoding "Wenig, Loudou"
26         Then exactly 0 results are returned
27
28     Scenario: When country names are deleted they are no longer searchable
29         Given the places
30             | osm | class    | type           | admin | name+name:xy | country | geometry |
31             | R1  | boundary | administrative | 2     | Loudou       | de      | (1,2,3,4,1) |
32         Given the places
33             | osm | class    | type          | name  |
34             | N10 | place    | town          | Wenig |
35         When importing
36         When geocoding "Wenig, Loudou"
37         Then all results contain
38             | object |
39             | N10 |
40         When updating places
41             | osm | class    | type           | admin | name+name:en | country | geometry |
42             | R1  | boundary | administrative | 2     | Germany      | de      | (1,2,3,4,1) |
43         When geocoding "Wenig, Loudou"
44         Then exactly 0 results are returned
45         When geocoding "Wenig"
46             | accept-language |
47             | xy,en |
48         Then all results contain
49             | object | display_name |
50             | N10    | Wenig, Germany |
51
52
53     Scenario: Default country names are always searchable
54         Given the places
55             | osm | class    | type          | name  |
56             | N10 | place    | town          | Wenig |
57         When importing
58         When geocoding "Wenig, Germany"
59         Then all results contain
60             | object |
61             | N10 |
62         When geocoding "Wenig, de"
63         Then all results contain
64             | object |
65             | N10 |
66         When updating places
67             | osm  | class    | type           | admin | name+name:en | country | geometry |
68             | R1   | boundary | administrative | 2     | Lilly        | de      | (1,2,3,4,1) |
69         When geocoding "Wenig, Germany"
70             | accept-language |
71             | en,de |
72         Then all results contain
73             | object | display_name |
74             | N10 | Wenig, Lilly |
75         When geocoding "Wenig, de"
76             | accept-language |
77             | en,de |
78         Then all results contain
79             | object | display_name |
80             | N10    | Wenig, Lilly |
81
82
83     Scenario: When a localised name is deleted, the standard name takes over
84         Given the places
85             | osm | class    | type           | admin | name+name:de | country | geometry |
86             | R1  | boundary | administrative | 2     | Loudou       | de      | (1,2,3,4,1) |
87         Given the places
88             | osm | class    | type          | name  |
89             | N10 | place    | town          | Wenig |
90         When importing
91         When geocoding "Wenig, Loudou"
92             | accept-language |
93             | de,en |
94         Then all results contain
95             | object | display_name |
96             | N10 | Wenig, Loudou |
97         When updating places
98             | osm | class    | type           | admin | name+name:en | country | geometry |
99             | R1  | boundary | administrative | 2     | Germany      | de      | (1,2,3,4,1) |
100         When geocoding "Wenig, Loudou"
101         Then exactly 0 results are returned
102         When geocoding "Wenig"
103             | accept-language |
104             | de,en |
105         Then all results contain
106             | object | display_name |
107             | N10    | Wenig, Deutschland |
108