X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/3bf3b894eaddd4f17f7e92353af6b2aa6200ab20..f289db9bfe21c5a725e751be98e2b824026e2310:/test/bdd/db/query/postcodes.feature diff --git a/test/bdd/db/query/postcodes.feature b/test/bdd/db/query/postcodes.feature index a3ca7035..fa4f6a0b 100644 --- a/test/bdd/db/query/postcodes.feature +++ b/test/bdd/db/query/postcodes.feature @@ -11,7 +11,7 @@ Feature: Querying fo postcode variants When sending search query "399174" Then results contain | ID | type | display_name | - | 0 | postcode | 399174 | + | 0 | postcode | 399174, Singapore | @fail-legacy @@ -25,11 +25,11 @@ Feature: Querying fo postcode variants When sending search query "3993 DX" Then results contain | ID | type | display_name | - | 0 | postcode | 3993 DX | + | 0 | postcode | 3993 DX, Nederland | When sending search query "3993dx" Then results contain | ID | type | display_name | - | 0 | postcode | 3993 DX | + | 0 | postcode | 3993 DX, Nederland | Examples: | postcode | @@ -49,7 +49,7 @@ Feature: Querying fo postcode variants When sending search query "399174" Then results contain | ID | type | display_name | - | 0 | postcode | 399174 | + | 0 | postcode | 399174, Singapore | @fail-legacy @@ -63,11 +63,11 @@ Feature: Querying fo postcode variants When sending search query "675" Then results contain | ID | type | display_name | - | 0 | postcode | AD675 | + | 0 | postcode | AD675, Andorra | When sending search query "AD675" Then results contain | ID | type | display_name | - | 0 | postcode | AD675 | + | 0 | postcode | AD675, Andorra | Examples: | postcode | @@ -76,6 +76,7 @@ Feature: Querying fo postcode variants | AD675 | + @fail-legacy Scenario: Different postcodes with the same normalization can both be found Given the places | osm | class | type | addr+postcode | addr+housenumber | geometry | @@ -89,9 +90,27 @@ Feature: Querying fo postcode variants When sending search query "EH4 7EA" Then results contain | type | display_name | - | postcode | EH4 7EA | + | postcode | EH4 7EA, United Kingdom | When sending search query "E4 7EA" Then results contain | type | display_name | - | postcode | E4 7EA | + | postcode | E4 7EA, United Kingdom | + + @fail-legacy + @v1-api-python-only + Scenario: Postcode areas are preferred over postcode points + Given the grid with origin DE + | 1 | 2 | + | 4 | 3 | + Given the places + | osm | class | type | postcode | geometry | + | R23 | boundary | postal_code | 12345 | (1,2,3,4,1) | + When importing + Then location_postcode contains exactly + | country | postcode | + | de | 12345 | + When sending search query "12345, de" + Then results contain + | osm | + | R23 |