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+name:de |
124 | osm | class | type | name+name:de | admin | geometry |
125 | N3 | place | city | newname | 30 | 0.00001 0 |
127 | object | linked_place_id | name+name:de |
128 | N3 | R1 | newname |
131 Scenario: Updating linkee extratags keeps linker's extratags
132 Given the named places
133 | osm | class | type | extra+wikidata | admin | geometry |
134 | R1 | boundary | administrative | 34 | 8 | poly-area:0.1 |
136 | osm | class | type | geometry |
137 | N3 | place | city | 0.00001 0 |
143 | object | extratags |
144 | R1 | 'wikidata' : '34', 'linked_place' : 'city' |
146 | osm | class | type | name | extra+oneway | admin | geometry |
147 | N3 | place | city | newname | yes | 30 | 0.00001 0 |
149 | object | extratags |
150 | R1 | 'wikidata' : '34', 'oneway' : 'yes', 'linked_place' : 'city' |
152 Scenario: Remove linked_place info when linkee is removed
154 | osm | class | type | name | geometry |
155 | N1 | place | city | foo | 0 0 |
157 | osm | class | type | name | admin | geometry |
158 | R1 | boundary | administrative | foo | 8 | poly-area:0.1 |
161 | object | extratags |
162 | R1 | 'linked_place' : 'city' |
163 When marking for delete N1
165 | object | extratags |
168 Scenario: Update linked_place info when linkee type changes
170 | osm | class | type | name | geometry |
171 | N1 | place | city | foo | 0 0 |
173 | osm | class | type | name | admin | geometry |
174 | R1 | boundary | administrative | foo | 8 | poly-area:0.1 |
177 | object | extratags |
178 | R1 | 'linked_place' : 'city' |
180 | osm | class | type | name | geometry |
181 | N1 | place | town | foo | 0 0 |
183 | object | extratags |
184 | R1 | 'linked_place' : 'town' |