forked from hans/Nominatim
83 lines
2.9 KiB
Gherkin
83 lines
2.9 KiB
Gherkin
Feature: Entrance nodes are recorded
|
|
Test that updated entrance nodes are saved
|
|
|
|
Scenario: A building with a newly tagged entrance
|
|
Given the grid
|
|
| 1 | 2 |
|
|
| 4 | 3 |
|
|
Given the places
|
|
| osm | class | type | geometry |
|
|
| W1 | building | yes | (1,2,3,4,1) |
|
|
And the ways
|
|
| id | nodes |
|
|
| 1 | 10,20,30,40 |
|
|
When importing
|
|
Then placex contains exactly
|
|
| object | place_id |
|
|
| W1 | 1 |
|
|
Then place_entrance contains exactly
|
|
| place_id | entrances |
|
|
When updating places
|
|
| osm | class | type | geometry |
|
|
| N10 | entrance | main | 1 |
|
|
Then placex contains exactly
|
|
| object | place_id |
|
|
| W1 | 1 |
|
|
And place_entrance contains exactly
|
|
| place_id | entrances |
|
|
| 1 | [{'lat': 0, 'lon': 0, 'type': 'main', 'osm_id': 10, 'extratags': None}] |
|
|
|
|
Scenario: A building with a updated entrance node
|
|
Given the grid
|
|
| 1 | 2 |
|
|
| 4 | 3 |
|
|
Given the places
|
|
| osm | class | type | geometry |
|
|
| W1 | building | yes | (1,2,3,4,1) |
|
|
| N10 | barrier | gate | 1 |
|
|
And the ways
|
|
| id | nodes |
|
|
| 1 | 10,20,30,40 |
|
|
When importing
|
|
Then placex contains exactly
|
|
| object | place_id |
|
|
| W1 | 1 |
|
|
| N10 | 2 |
|
|
Then place_entrance contains exactly
|
|
| place_id | entrances |
|
|
When updating places
|
|
| osm | class | type | geometry |
|
|
| N10 | entrance | main | 1 |
|
|
Then placex contains exactly
|
|
| object | place_id |
|
|
| W1 | 1 |
|
|
| N10 | 2 |
|
|
And place_entrance contains exactly
|
|
| place_id | entrances |
|
|
| 1 | [{'lat': 0, 'lon': 0, 'type': 'main', 'osm_id': 10, 'extratags': None}] |
|
|
|
|
Scenario: A building with a removed entrance
|
|
Given the grid
|
|
| 1 | 2 |
|
|
| 4 | 3 |
|
|
Given the places
|
|
| osm | class | type | geometry |
|
|
| W1 | building | yes | (1,2,3,4,1) |
|
|
| N10 | entrance | main | 1 |
|
|
And the ways
|
|
| id | nodes |
|
|
| 1 | 10,20,30,40 |
|
|
When importing
|
|
Then placex contains exactly
|
|
| object | place_id |
|
|
| W1 | 1 |
|
|
And place_entrance contains exactly
|
|
| place_id | entrances |
|
|
| 1 | [{'lat': 0, 'lon': 0, 'type': 'main', 'osm_id': 10, 'extratags': None}] |
|
|
When marking for delete N10
|
|
Then placex contains exactly
|
|
| object | place_id |
|
|
| W1 | 1 |
|
|
And place_entrance contains exactly
|
|
| place_id | entrances |
|