2 Feature: Querying fo postcode variants
4 Scenario: Postcodes in Singapore (6-digit postcode)
5 Given the grid with origin SG
8 | osm | class | type | name | addr+postcode | geometry |
9 | W1 | highway | path | Lorang | 399174 | 10,11 |
11 When sending search query "399174"
13 | ID | type | display_name |
14 | 0 | postcode | 399174 |
18 Scenario Outline: Postcodes in the Netherlands (mixed postcode with spaces)
19 Given the grid with origin NL
22 | osm | class | type | name | addr+postcode | geometry |
23 | W1 | highway | path | De Weide | 3993 DX | 10,11 |
25 When sending search query "3993 DX"
27 | ID | type | display_name |
28 | 0 | postcode | 3993 DX |
29 When sending search query "3993dx"
31 | ID | type | display_name |
32 | 0 | postcode | 3993 DX |
42 Scenario: Postcodes in Singapore (6-digit postcode)
43 Given the grid with origin SG
46 | osm | class | type | name | addr+postcode | geometry |
47 | W1 | highway | path | Lorang | 399174 | 10,11 |
49 When sending search query "399174"
51 | ID | type | display_name |
52 | 0 | postcode | 399174 |
56 Scenario Outline: Postcodes in Andorra (with country code)
57 Given the grid with origin AD
60 | osm | class | type | name | addr+postcode | geometry |
61 | W1 | highway | path | Lorang | <postcode> | 10,11 |
63 When sending search query "675"
65 | ID | type | display_name |
66 | 0 | postcode | AD675 |
67 When sending search query "AD675"
69 | ID | type | display_name |
70 | 0 | postcode | AD675 |
79 Scenario: Different postcodes with the same normalization can both be found
81 | osm | class | type | addr+postcode | addr+housenumber | geometry |
82 | N34 | place | house | EH4 7EA | 111 | country:gb |
83 | N35 | place | house | E4 7EA | 111 | country:gb |
85 Then location_postcode contains exactly
86 | country | postcode | geometry |
87 | gb | EH4 7EA | country:gb |
88 | gb | E4 7EA | country:gb |
89 When sending search query "EH4 7EA"
91 | type | display_name |
92 | postcode | EH4 7EA |
93 When sending search query "E4 7EA"
95 | type | display_name |