]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/bdd/db/import/parenting.feature
remove special casing for legacy tokenizer from BDD tests
[nominatim.git] / test / bdd / db / import / parenting.feature
index 2500d2a908cedb5b592fcf875e144b6087a29540..55fa6a605b3b4858a81a0ab56d317e4fc9722747 100644 (file)
@@ -23,12 +23,12 @@ Feature: Parenting of objects
          | N2     | W1 |
         When sending search query "4 galoo"
         Then results contain
-         | ID | osm_type | osm_id | display_name |
-         | 0  | N        | 1      | 4, galoo, 12345, Deutschland |
+         | ID | osm | display_name |
+         | 0  | N1  | 4, galoo, 12345, Deutschland |
         When sending search query "5 galoo"
         Then results contain
-         | ID | osm_type | osm_id | display_name |
-         | 0  | N        | 2      | 5, galoo, 99999, Deutschland |
+         | ID | osm | display_name |
+         | 0  | N2  | 5, galoo, 99999, Deutschland |
 
     Scenario: Address without tags, closest street
         Given the grid
@@ -104,7 +104,6 @@ Feature: Parenting of objects
          | N3     | W2 |
          | N4     | W1 |
 
-    @fail-legacy
     Scenario: addr:street tag parents to appropriately named street, locale names
         Given the grid
          | 10 |   |   |   |   | 11 |
@@ -437,6 +436,29 @@ Feature: Parenting of objects
           | object | parent_place_id |
           | N9     | R14             |
 
+
+    Scenario: Choose closest street in associatedStreet relation
+        Given the grid
+         | 1  |   |    |  | 3  |
+         | 10 |   | 11 |  | 12 |
+        And the places
+         | osm | class | type  | housenr | geometry |
+         | N1  | place | house | 1       | 1        |
+         | N3  | place | house | 3       | 3        |
+        And the named places
+         | osm  | class    | type        | geometry |
+         | W100 | highway  | residential | 10,11    |
+         | W101 | highway  | residential | 11,12    |
+        And the relations
+         | id | members                                            | tags+type |
+         | 1  | N1:house,N3:house,W100:street,W101:street | associatedStreet |
+        When importing
+        Then placex contains
+         | object | parent_place_id |
+         | N1     | W100            |
+         | N3     | W101            |
+
+
     Scenario: POIs in building inherit address
         Given the grid
          | 10 |  |   |   |   |   | 11 |