2 Feature: Update of search terms
3 Tests that search_name table is filled correctly
5 Scenario: POI-inherited postcode remains when way type is changed
6 Given the scene roads-with-pois
8 | osm_id | class | type | housenumber | postcode | street | geometry
9 | 1 | place | house | 1 | 12345 | North St |:p-S1
11 | osm_id | class | type | name | geometry
12 | 1 | highway | residential | North St | :w-north
14 Then search_name table contains
15 | place_id | nameaddress_vector
17 When updating place ways
18 | osm_id | class | type | name | geometry
19 | 1 | highway | unclassified | North St | :w-north
20 Then search_name table contains
21 | place_id | nameaddress_vector
24 Scenario: POI-inherited postcode remains when way name is changed
25 Given the scene roads-with-pois
27 | osm_id | class | type | housenumber | postcode | street | geometry
28 | 1 | place | house | 1 | 12345 | North St |:p-S1
30 | osm_id | class | type | name | geometry
31 | 1 | highway | residential | North St | :w-north
33 Then search_name table contains
34 | place_id | nameaddress_vector
36 When updating place ways
37 | osm_id | class | type | name | geometry
38 | 1 | highway | unclassified | South St | :w-north
39 Then search_name table contains
40 | place_id | nameaddress_vector
43 Scenario: POI-inherited postcode remains when way geometry is changed
44 Given the scene roads-with-pois
46 | osm_id | class | type | housenumber | postcode | street | geometry
47 | 1 | place | house | 1 | 12345 | North St |:p-S1
49 | osm_id | class | type | name | geometry
50 | 1 | highway | residential | North St | :w-north
52 Then search_name table contains
53 | place_id | nameaddress_vector
55 When updating place ways
56 | osm_id | class | type | name | geometry
57 | 1 | highway | unclassified | South St | :w-south
58 Then search_name table contains
59 | place_id | nameaddress_vector
62 Scenario: POI-inherited postcode is added when POI postcode changes
63 Given the scene roads-with-pois
65 | osm_id | class | type | housenumber | postcode | street | geometry
66 | 1 | place | house | 1 | 12345 | North St |:p-S1
68 | osm_id | class | type | name | geometry
69 | 1 | highway | residential | North St | :w-north
71 Then search_name table contains
72 | place_id | nameaddress_vector
74 When updating place nodes
75 | osm_id | class | type | housenumber | postcode | street | geometry
76 | 1 | place | house | 1 | 54321 | North St |:p-S1
77 Then search_name table contains
78 | place_id | nameaddress_vector
81 Scenario: POI-inherited postcode remains when POI geometry changes
82 Given the scene roads-with-pois
84 | osm_id | class | type | housenumber | postcode | street | geometry
85 | 1 | place | house | 1 | 12345 | North St |:p-S1
87 | osm_id | class | type | name | geometry
88 | 1 | highway | residential | North St | :w-north
90 Then search_name table contains
91 | place_id | nameaddress_vector
93 When updating place nodes
94 | osm_id | class | type | housenumber | postcode | street | geometry
95 | 1 | place | house | 1 | 12345 | North St |:p-S2
96 Then search_name table contains
97 | place_id | nameaddress_vector
101 Scenario: POI-inherited postcode remains when another POI is deleted
102 Given the scene roads-with-pois
104 | osm_id | class | type | housenumber | postcode | street | geometry
105 | 1 | place | house | 1 | 12345 | North St |:p-S1
106 | 2 | place | house | 2 | | North St |:p-S2
108 | osm_id | class | type | name | geometry
109 | 1 | highway | residential | North St | :w-north
111 Then search_name table contains
112 | place_id | nameaddress_vector
114 When marking for delete N2
115 Then search_name table contains
116 | place_id | nameaddress_vector