2 Feature: Import and search of names
3 Tests all naming related issues: normalisation,
4 abbreviations, internationalisation, etc.
6 Scenario: Case-insensitivity of search
8 | osm | class | type | name |
9 | N1 | place | locality | FooBar |
12 | object | class | type | name+name |
13 | N1 | place | locality | FooBar |
14 When sending search query "FooBar"
18 When sending search query "foobar"
22 When sending search query "fOObar"
26 When sending search query "FOOBAR"
31 Scenario: Multiple spaces in name
33 | osm | class | type | name |
34 | N1 | place | locality | one two three |
36 When sending search query "one two three"
40 When sending search query "one two three"
44 When sending search query "one two three"
48 When sending search query " one two three"
53 Scenario: Special characters in name
55 | osm | class | type | name |
56 | N1 | place | locality | Jim-Knopf-Straße |
57 | N2 | place | locality | Smith/Weston |
58 | N3 | place | locality | space mountain |
59 | N4 | place | locality | space |
60 | N5 | place | locality | mountain |
62 When sending search query "Jim-Knopf-Str"
66 When sending search query "Jim Knopf-Str"
70 When sending search query "Jim Knopf Str"
74 When sending search query "Jim/Knopf-Str"
78 When sending search query "Jim-Knopfstr"
82 When sending search query "Smith/Weston"
86 When sending search query "Smith Weston"
90 When sending search query "Smith-Weston"
94 When sending search query "space mountain"
98 When sending search query "space-mountain"
102 When sending search query "space/mountain"
106 When sending search query "space\mountain"
110 When sending search query "space(mountain)"
115 Scenario: Landuse with name are found
117 | osm | class | type | name | geometry |
118 | R1 | natural | meadow | landuse1 | (0 0, 1 0, 1 1, 0 1, 0 0) |
119 | R2 | landuse | industrial | landuse2 | (0 0, -1 0, -1 -1, 0 -1, 0 0) |
121 When sending search query "landuse1"
125 When sending search query "landuse2"
130 Scenario: Postcode boundaries without ref
132 | osm | class | type | postcode | geometry |
133 | R1 | boundary | postal_code | 12345 | (0 0, 1 0, 1 1, 0 1, 0 0) |
135 When sending search query "12345"
140 Scenario: Unprintable characters in postcodes are ignored
141 Given the named places
142 | osm | class | type | address |
143 | N234 | amenity | prison | 'postcode' : u'1234\u200e' |
145 And sending search query "1234"
146 Then result 0 has not attributes osm_type
148 Scenario Outline: Housenumbers with special characters are found
153 | osm | class | type | name | geometry |
154 | W1 | highway | primary | Main St | 1,2 |
156 | osm | class | type | housenr | geometry |
157 | N1 | building | yes | <nr> | 9 |
159 And sending search query "Main St <nr>"
161 | osm | display_name |
162 | N1 | <nr>, Main St |
176 Scenario Outline: Housenumbers in lists are found
181 | osm | class | type | name | geometry |
182 | W1 | highway | primary | Main St | 1,2 |
184 | osm | class | type | housenr | geometry |
185 | N1 | building | yes | <nr-list> | 9 |
187 And sending search query "Main St <nr>"
189 | osm | display_name |
190 | N1 | <nr-list>, Main St |