3 Feature: Querying fo postcode variants
5 Scenario: Postcodes in Singapore (6-digit postcode)
6 Given the grid with origin SG
9 | osm | class | type | name | addr+postcode | geometry |
10 | W1 | highway | path | Lorang | 399174 | 10,11 |
12 When sending search query "399174"
14 | ID | type | display_name |
15 | 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 |
41 Scenario: Postcodes in Singapore (6-digit postcode)
42 Given the grid with origin SG
45 | osm | class | type | name | addr+postcode | geometry |
46 | W1 | highway | path | Lorang | 399174 | 10,11 |
48 When sending search query "399174"
50 | ID | type | display_name |
51 | 0 | postcode | 399174 |
54 Scenario Outline: Postcodes in Andorra (with country code)
55 Given the grid with origin AD
58 | osm | class | type | name | addr+postcode | geometry |
59 | W1 | highway | path | Lorang | <postcode> | 10,11 |
61 When sending search query "675"
63 | ID | type | display_name |
64 | 0 | postcode | AD675 |
65 When sending search query "AD675"
67 | ID | type | display_name |
68 | 0 | postcode | AD675 |
77 Scenario: Different postcodes with the same normalization can both be found
79 | osm | class | type | addr+postcode | addr+housenumber | geometry |
80 | N34 | place | house | EH4 7EA | 111 | country:gb |
81 | N35 | place | house | E4 7EA | 111 | country:gb |
83 Then location_postcode contains exactly
84 | country | postcode | geometry |
85 | gb | EH4 7EA | country:gb |
86 | gb | E4 7EA | country:gb |
87 When sending search query "EH4 7EA"
89 | type | display_name |
90 | postcode | EH4 7EA |
91 When sending search query "E4 7EA"
93 | type | display_name |