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
11 | osm | class | type | name |
12 | N1 | place | city | foo |
14 | osm | class | type | name | admin | geometry |
15 | R1 | boundary | administrative | foo | 8 | (10,11,12,13,10) |
18 | object | linked_place_id |
21 | osm | class | type | name | name+name:de | admin | geometry |
22 | R1 | boundary | administrative | foo | Dingens | 8 | (10,11,12,13,10) |
24 | object | linked_place_id |
28 Scenario: Add linked place when linking relation is renamed
34 | osm | class | type | name |
35 | N1 | place | city | foo |
37 | osm | class | type | name | admin | geometry |
38 | R1 | boundary | administrative | foo | 8 | (10,11,12,13,10) |
41 | object | linked_place_id |
43 When sending search query "foo"
50 | osm | class | type | name | admin | geometry |
51 | R1 | boundary | administrative | foobar | 8 | (10,11,12,13,10) |
53 | object | linked_place_id |
55 When sending search query "foo"
62 Scenario: Add linked place when linking relation is removed
68 | osm | class | type | name |
69 | N1 | place | city | foo |
71 | osm | class | type | name | admin | geometry |
72 | R1 | boundary | administrative | foo | 8 | (10,11,12,13,10) |
74 And sending search query "foo"
80 When marking for delete R1
82 | object | linked_place_id |
84 When sending search query "foo"
91 Scenario: Remove linked place when linking relation is added
97 | osm | class | type | name |
98 | N1 | place | city | foo |
100 And sending search query "foo"
107 | osm | class | type | name | admin | geometry |
108 | R1 | boundary | administrative | foo | 8 | (10,11,12,13,10) |
110 | object | linked_place_id |
112 When sending search query "foo"
119 Scenario: Remove linked place when linking relation is renamed
125 | osm | class | type | name |
126 | N1 | place | city | foo |
128 | osm | class | type | name | admin | geometry |
129 | R1 | boundary | administrative | foobar | 8 | (10,11,12,13,10) |
131 And sending search query "foo"
138 | osm | class | type | name | admin | geometry |
139 | R1 | boundary | administrative | foo | 8 | (10,11,12,13,10) |
141 | object | linked_place_id |
143 When sending search query "foo"
150 Scenario: Update linking relation when linkee name is updated
156 | osm | class | type | name | admin | geometry |
157 | R1 | boundary | administrative | rel | 8 | (10,11,12,13,10) |
159 | osm | class | type | name+name:de |
160 | N3 | place | city | greeny |
166 | object | linked_place_id | name+_place_name:de |
169 | object | linked_place_id | name+name:de |
172 | osm | class | type | name+name:de |
173 | N3 | place | city | newname |
175 | object | linked_place_id | name+name:de |
176 | N3 | R1 | newname |
178 | object | linked_place_id | name+_place_name:de |
181 Scenario: Update linking relation when linkee name is deleted
187 | osm | class | type | name | admin | geometry |
188 | R1 | boundary | administrative | rel | 8 | (10,11,12,13,10) |
190 | osm | class | type | name |
191 | N3 | place | city | greeny |
197 | object | linked_place_id | name+_place_name | name+name |
198 | R1 | - | greeny | rel |
200 | object | linked_place_id | name+name |
202 When sending search query "greeny"
207 | osm | class | type | name+name:de |
208 | N3 | place | city | depnt |
210 | object | linked_place_id | name+name:de |
213 | object | linked_place_id | name+_place_name:de | name+name |
214 | R1 | - | depnt | rel |
215 When sending search query "greeny"
216 Then exactly 0 results are returned
218 Scenario: Updating linkee extratags keeps linker's extratags
223 Given the named places
224 | osm | class | type | extra+wikidata | admin | geometry |
225 | R1 | boundary | administrative | 34 | 8 | (10,11,12,13,10) |
227 | osm | class | type |
228 | N3 | place | city |
234 | object | extratags |
235 | R1 | 'wikidata' : '34', 'linked_place' : 'city' |
237 | osm | class | type | name | extra+oneway |
238 | N3 | place | city | newname | yes |
240 | object | extratags |
241 | R1 | 'wikidata' : '34', 'oneway' : 'yes', 'linked_place' : 'city' |
243 Scenario: Remove linked_place info when linkee is removed
249 | osm | class | type | name |
250 | N1 | place | city | foo |
252 | osm | class | type | name | admin | geometry |
253 | R1 | boundary | administrative | foo | 8 | (10,11,12,13,10) |
256 | object | extratags |
257 | R1 | 'linked_place' : 'city' |
258 When marking for delete N1
260 | object | extratags |
263 Scenario: Update linked_place info when linkee type changes
269 | osm | class | type | name |
270 | N1 | place | city | foo |
272 | osm | class | type | name | admin | geometry |
273 | R1 | boundary | administrative | foo | 8 | (10,11,12,13,10) |
276 | object | extratags |
277 | R1 | 'linked_place' : 'city' |
279 | osm | class | type | name |
280 | N1 | place | town | foo |
282 | object | extratags |
283 | R1 | 'linked_place' : 'town' |
286 Scenario: Keep linking and ranks when place type changes
292 | osm | class | type | name | admin | geometry |
293 | R1 | boundary | administrative | foo | 8 | (1,2,3,4,1) |
295 | osm | class | type | name | geometry |
296 | N1 | place | city | foo | 9 |
299 | object | linked_place_id | rank_address |
304 | osm | class | type | name | geometry |
305 | N1 | place | town | foo | 9 |
307 | object | linked_place_id | rank_address |
312 Scenario: Invalidate surrounding place nodes when place type changes
318 | osm | class | type | name | admin | geometry |
319 | R1 | boundary | administrative | foo | 8 | (1,2,3,4,1) |
321 | osm | class | type | name | geometry |
322 | N1 | place | town | foo | 9 |
323 | N2 | place | city | bar | 8 |
329 | object | linked_place_id | rank_address |
335 | osm | class | type | name | geometry |
336 | N1 | place | suburb | foo | 9 |
338 | object | linked_place_id | rank_address |