]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/features/db/update/entrances.feature
correct default setting for addressdetails parameter in lookup
[nominatim.git] / test / bdd / features / db / update / entrances.feature
1 Feature: Entrance nodes are recorded
2     Test that updated entrance nodes are saved
3
4     Scenario: A building with a newly tagged entrance
5         Given the grid
6           | 1 | 2 |
7           | 4 | 3 |
8         Given the places
9           | osm  | class    | type  | geometry    |
10           | W1   | building | yes   | (1,2,3,4,1) |
11         And the ways
12           | id | nodes         |
13           | 1  | 1, 2, 3, 4, 1 |
14         When importing
15         Then placex contains exactly
16          | object | place_id |
17          | W1     | 1        |
18         Then placex_entrance contains exactly
19          | place_id | osm_id | type | location!wkt | extratags |
20         When updating places
21           | osm | class    | type  | geometry    |
22           | N1  | entrance | main  | 1           |
23           | W1  | building | yes   | (1,2,3,4,1) |
24         Then placex contains exactly
25          | object | place_id |
26          | W1     | 1        |
27         Then placex_entrance contains exactly
28          | place_id | osm_id | type | location!wkt | extratags |
29          | 1        | 1      | main | 1            | -         |
30
31     Scenario: A building with a updated entrance node
32         Given the grid
33           | 1 | 2 |
34           | 4 | 3 |
35         Given the places
36           | osm | class    | type  | geometry    |
37           | N1  | barrier  | gate  | 1           |
38           | W1  | building | yes   | (1,2,3,4,1) |
39         And the ways
40           | id | nodes         |
41           | 1  | 1, 2, 3, 4, 1 |
42         When importing
43         Then placex contains exactly
44          | object | place_id |
45          | N1     | 1        |
46          | W1     | 2        |
47         Then placex_entrance contains exactly
48          | place_id | osm_id | type | location!wkt | extratags |
49         When updating places
50           | osm | class    | type  | geometry    |
51           | N1  | entrance | main  | 1           |
52           | W1  | building | yes   | (1,2,3,4,1) |
53         Then placex contains exactly
54          | object | place_id |
55          | N1     | 1        |
56          | W1     | 2        |
57         And placex_entrance contains exactly
58          | place_id | osm_id | type | location!wkt | extratags |
59          | 2        | 1      | main | 1            | -         |
60
61     Scenario: A building with a removed entrance
62         Given the grid
63           | 1 | 2 |
64           | 4 | 3 |
65         Given the places
66           | osm | class    | type  | geometry    |
67           | N1  | entrance | main  | 1           |
68           | W1  | building | yes   | (1,2,3,4,1) |
69         And the ways
70           | id | nodes         |
71           | 1  | 1, 2, 3, 4, 1 |
72         When importing
73         Then placex contains exactly
74          | object | place_id |
75          | W1     | 1        |
76         And placex_entrance contains exactly
77          | place_id | osm_id | type | location!wkt | extratags |
78          | 1        | 1      | main | 1            | -         |
79         When marking for delete N1
80         And updating places
81           | osm | class    | type  | geometry  |
82           | W1  | building | yes   | (2,3,4,2) |
83         Then placex contains exactly
84          | object | place_id |
85          | W1     | 1        |
86         And placex_entrance contains exactly
87          | place_id | osm_id | type | location!wkt | extratags |
88
89     Scenario: A building with a removed and remaining entrance
90         Given the grid
91           | 1 | 2 |
92           | 4 | 3 |
93         Given the places
94           | osm | class    | type  | geometry    |
95           | N1  | entrance | main  | 1           |
96           | N3  | entrance | yes   | 3           |
97           | W1  | building | yes   | (1,2,3,4,1) |
98         And the ways
99           | id | nodes         |
100           | 1  | 1, 2, 3, 4, 1 |
101         When importing
102         Then placex contains exactly
103          | object | place_id |
104          | W1     | 1        |
105         And placex_entrance contains exactly
106          | place_id | osm_id | type | location!wkt | extratags |
107          | 1        | 1      | main | 1            | -         |
108          | 1        | 3      | yes  | 3            | -         |
109         When marking for delete N1
110         And updating places
111           | osm | class    | type  | geometry  |
112           | W1  | building | yes   | (2,3,4,2) |
113         Then placex contains exactly
114          | object | place_id |
115          | W1     | 1        |
116         And placex_entrance contains exactly
117          | place_id | osm_id | type | location!wkt | extratags |
118          | 1        | 3      | yes  | 3            | -         |