2 Feature: Updates of linked places
3 Tests that linked places are correctly added and deleted.
5 Scenario: Linking is kept when boundary is updated
7 | osm | class | type | name | geometry |
8 | N1 | place | city | foo | 0 0 |
10 | osm | class | type | name | admin | geometry |
11 | R1 | boundary | administrative | foo | 8 | poly-area:0.1 |
14 | object | linked_place_id |
17 | osm | class | type | name | name+name:de | admin | geometry |
18 | R1 | boundary | administrative | foo | Dingens | 8 | poly-area:0.1 |
20 | object | linked_place_id |
24 Scenario: Add linked place when linking relation is renamed
26 | osm | class | type | name | geometry |
27 | N1 | place | city | foo | 0 0 |
29 | osm | class | type | name | admin | geometry |
30 | R1 | boundary | administrative | foo | 8 | poly-area:0.1 |
32 And sending search query "foo"
39 | osm | class | type | name | admin | geometry |
40 | R1 | boundary | administrative | foobar | 8 | poly-area:0.1 |
42 | object | linked_place_id |
44 When sending search query "foo"
51 Scenario: Add linked place when linking relation is removed
53 | osm | class | type | name | geometry |
54 | N1 | place | city | foo | 0 0 |
56 | osm | class | type | name | admin | geometry |
57 | R1 | boundary | administrative | foo | 8 | poly-area:0.1 |
59 And sending search query "foo"
65 When marking for delete R1
67 | object | linked_place_id |
69 When sending search query "foo"
76 Scenario: Remove linked place when linking relation is added
78 | osm | class | type | name | geometry |
79 | N1 | place | city | foo | 0 0 |
81 And sending search query "foo"
88 | osm | class | type | name | admin | geometry |
89 | R1 | boundary | administrative | foo | 8 | poly-area:0.1 |
91 | object | linked_place_id |
93 When sending search query "foo"
100 Scenario: Remove linked place when linking relation is renamed
102 | osm | class | type | name | geometry |
103 | N1 | place | city | foo | 0 0 |
105 | osm | class | type | name | admin | geometry |
106 | R1 | boundary | administrative | foobar | 8 | poly-area:0.1 |
108 And sending search query "foo"
115 | osm | class | type | name | admin | geometry |
116 | R1 | boundary | administrative | foo | 8 | poly-area:0.1 |
118 | object | linked_place_id |
120 When sending search query "foo"
127 Scenario: Update linking relation when linkee name is updated
129 | osm | class | type | name | admin | geometry |
130 | R1 | boundary | administrative | rel | 8 | poly-area:0.1 |
132 | osm | class | type | name+name:de | admin | geometry |
133 | N3 | place | city | pnt | 30 | 0.00001 0 |
139 | object | linked_place_id | name+_place_name:de |
142 | object | linked_place_id | name+name:de |
145 | osm | class | type | name+name:de | admin | geometry |
146 | N3 | place | city | newname | 30 | 0.00001 0 |
148 | object | linked_place_id | name+name:de |
149 | N3 | R1 | newname |
151 | object | linked_place_id | name+_place_name:de |
154 Scenario: Update linking relation when linkee name is deleted
156 | osm | class | type | name | admin | geometry |
157 | R1 | boundary | administrative | rel | 8 | poly-area:0.1 |
159 | osm | class | type | name | admin | geometry |
160 | N3 | place | city | pnt | 30 | 0.00001 0 |
166 | object | linked_place_id | name+_place_name | name+name |
167 | R1 | - | pnt | rel |
169 | object | linked_place_id | name+name |
171 When sending search query "pnt"
176 | osm | class | type | name+name:de | admin | geometry |
177 | N3 | place | city | depnt | 30 | 0.00001 0 |
179 | object | linked_place_id | name+name:de |
182 | object | linked_place_id | name+_place_name:de | name+name |
183 | R1 | - | depnt | rel |
184 When sending search query "pnt"
185 Then exactly 0 results are returned
187 Scenario: Updating linkee extratags keeps linker's extratags
188 Given the named places
189 | osm | class | type | extra+wikidata | admin | geometry |
190 | R1 | boundary | administrative | 34 | 8 | poly-area:0.1 |
192 | osm | class | type | geometry |
193 | N3 | place | city | 0.00001 0 |
199 | object | extratags |
200 | R1 | 'wikidata' : '34', 'linked_place' : 'city' |
202 | osm | class | type | name | extra+oneway | admin | geometry |
203 | N3 | place | city | newname | yes | 30 | 0.00001 0 |
205 | object | extratags |
206 | R1 | 'wikidata' : '34', 'oneway' : 'yes', 'linked_place' : 'city' |
208 Scenario: Remove linked_place info when linkee is removed
210 | osm | class | type | name | geometry |
211 | N1 | place | city | foo | 0 0 |
213 | osm | class | type | name | admin | geometry |
214 | R1 | boundary | administrative | foo | 8 | poly-area:0.1 |
217 | object | extratags |
218 | R1 | 'linked_place' : 'city' |
219 When marking for delete N1
221 | object | extratags |
224 Scenario: Update linked_place info when linkee type changes
226 | osm | class | type | name | geometry |
227 | N1 | place | city | foo | 0 0 |
229 | osm | class | type | name | admin | geometry |
230 | R1 | boundary | administrative | foo | 8 | poly-area:0.1 |
233 | object | extratags |
234 | R1 | 'linked_place' : 'city' |
236 | osm | class | type | name | geometry |
237 | N1 | place | town | foo | 0 0 |
239 | object | extratags |
240 | R1 | 'linked_place' : 'town' |
243 Scenario: Keep linking and ranks when place type changes
249 | osm | class | type | name | admin | geometry |
250 | R1 | boundary | administrative | foo | 8 | (1,2,3,4,1) |
252 | osm | class | type | name | geometry |
253 | N1 | place | city | foo | 9 |
256 | object | linked_place_id | rank_address |
261 | osm | class | type | name | geometry |
262 | N1 | place | town | foo | 9 |
264 | object | linked_place_id | rank_address |