2 Feature: Updates of linked places
3 Tests that linked places are correctly added and deleted.
5 Scenario: Add linked place when linking relation is renamed
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 |
13 And sending search query "foo"
20 | osm | class | type | name | admin | geometry |
21 | R1 | boundary | administrative | foobar | 8 | poly-area:0.1 |
23 | object | linked_place_id |
25 When sending search query "foo"
32 Scenario: Add linked place when linking relation is removed
34 | osm | class | type | name | geometry |
35 | N1 | place | city | foo | 0 0 |
37 | osm | class | type | name | admin | geometry |
38 | R1 | boundary | administrative | foo | 8 | poly-area:0.1 |
40 And sending search query "foo"
46 When marking for delete R1
48 | object | linked_place_id |
50 When sending search query "foo"
57 Scenario: Remove linked place when linking relation is added
59 | osm | class | type | name | geometry |
60 | N1 | place | city | foo | 0 0 |
62 And sending search query "foo"
69 | osm | class | type | name | admin | geometry |
70 | R1 | boundary | administrative | foo | 8 | poly-area:0.1 |
72 | object | linked_place_id |
74 When sending search query "foo"
81 Scenario: Remove linked place when linking relation is renamed
83 | osm | class | type | name | geometry |
84 | N1 | place | city | foo | 0 0 |
86 | osm | class | type | name | admin | geometry |
87 | R1 | boundary | administrative | foobar | 8 | poly-area:0.1 |
89 And sending search query "foo"
96 | osm | class | type | name | admin | geometry |
97 | R1 | boundary | administrative | foo | 8 | poly-area:0.1 |
99 | object | linked_place_id |
101 When sending search query "foo"
108 Scenario: Update linking relation when linkee name is updated
110 | osm | class | type | name | admin | geometry |
111 | R1 | boundary | administrative | rel | 8 | poly-area:0.1 |
113 | osm | class | type | name+name:de | admin | geometry |
114 | N3 | place | city | pnt | 30 | 0.00001 0 |
120 | object | linked_place_id | name+_place_name:de |
123 | object | linked_place_id | name+name:de |
126 | osm | class | type | name+name:de | admin | geometry |
127 | N3 | place | city | newname | 30 | 0.00001 0 |
129 | object | linked_place_id | name+name:de |
130 | N3 | R1 | newname |
132 | object | linked_place_id | name+_place_name:de |
135 Scenario: Update linking relation when linkee name is deleted
137 | osm | class | type | name | admin | geometry |
138 | R1 | boundary | administrative | rel | 8 | poly-area:0.1 |
140 | osm | class | type | name | admin | geometry |
141 | N3 | place | city | pnt | 30 | 0.00001 0 |
147 | object | linked_place_id | name+_place_name | name+name |
148 | R1 | - | pnt | rel |
150 | object | linked_place_id | name+name |
152 When sending search query "pnt"
157 | osm | class | type | name+name:de | admin | geometry |
158 | N3 | place | city | depnt | 30 | 0.00001 0 |
160 | object | linked_place_id | name+name:de |
163 | object | linked_place_id | name+_place_name:de | name+name |
164 | R1 | - | depnt | rel |
165 When sending search query "pnt"
166 Then exactly 0 results are returned
168 Scenario: Updating linkee extratags keeps linker's extratags
169 Given the named places
170 | osm | class | type | extra+wikidata | admin | geometry |
171 | R1 | boundary | administrative | 34 | 8 | poly-area:0.1 |
173 | osm | class | type | geometry |
174 | N3 | place | city | 0.00001 0 |
180 | object | extratags |
181 | R1 | 'wikidata' : '34', 'linked_place' : 'city' |
183 | osm | class | type | name | extra+oneway | admin | geometry |
184 | N3 | place | city | newname | yes | 30 | 0.00001 0 |
186 | object | extratags |
187 | R1 | 'wikidata' : '34', 'oneway' : 'yes', 'linked_place' : 'city' |
189 Scenario: Remove linked_place info when linkee is removed
191 | osm | class | type | name | geometry |
192 | N1 | place | city | foo | 0 0 |
194 | osm | class | type | name | admin | geometry |
195 | R1 | boundary | administrative | foo | 8 | poly-area:0.1 |
198 | object | extratags |
199 | R1 | 'linked_place' : 'city' |
200 When marking for delete N1
202 | object | extratags |
205 Scenario: Update linked_place info when linkee type changes
207 | osm | class | type | name | geometry |
208 | N1 | place | city | foo | 0 0 |
210 | osm | class | type | name | admin | geometry |
211 | R1 | boundary | administrative | foo | 8 | poly-area:0.1 |
214 | object | extratags |
215 | R1 | 'linked_place' : 'city' |
217 | osm | class | type | name | geometry |
218 | N1 | place | town | foo | 0 0 |
220 | object | extratags |
221 | R1 | 'linked_place' : 'town' |