Skip to content

Commit 48866f7

Browse files
Add sample counties/cities
1 parent 1c4ac28 commit 48866f7

File tree

1 file changed

+63
-5
lines changed

1 file changed

+63
-5
lines changed

test/services/location-integration.js

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const villages = [
4040
'Heyshott',
4141
'Hinton St George',
4242
'Holme-next-the-Sea',
43-
// 'Hoxne',
43+
'Hoxne',
4444
'Icklesham',
4545
'Ilmington',
4646
'Kersey',
@@ -75,7 +75,7 @@ const villages = [
7575
'Staithes',
7676
'Stanton',
7777
'Steeple Ashton',
78-
// 'Stoke Gabriel',
78+
'Stoke Gabriel',
7979
'Stow-on-the-Wold',
8080
'Swanton Morley',
8181
'Symondsbury',
@@ -164,7 +164,6 @@ const towns = [
164164
'Hexham',
165165
'Hitchin',
166166
'Honiton',
167-
'Hoxne',
168167
'Hungerford',
169168
'Ilkeston',
170169
'Kendal',
@@ -204,11 +203,66 @@ const towns = [
204203
'Sandbach',
205204
'Shepton Mallet',
206205
'St Ives, Cornwall',
207-
'Stoke Gabriel',
208206
'Stone',
209207
'Wetherby'
210208
]
211209

210+
const counties = [
211+
'Bedfordshire',
212+
'Berkshire',
213+
'Buckinghamshire',
214+
'Cambridgeshire',
215+
'Cheshire',
216+
'Cornwall',
217+
'Cumbria',
218+
'Derbyshire',
219+
'Devon',
220+
'Dorset',
221+
'Durham',
222+
'East Sussex',
223+
'Essex',
224+
'Gloucestershire',
225+
'Greater Manchester',
226+
'Hampshire',
227+
'Herefordshire',
228+
'Hertfordshire',
229+
'Isle of Wight',
230+
'Kent',
231+
'Lancashire',
232+
'Leicestershire',
233+
'Lincolnshire',
234+
'Shropshire',
235+
'West Yorkshire'
236+
]
237+
238+
const cities = [
239+
'Bath',
240+
'Birmingham',
241+
'Bradford',
242+
'Brighton and Hove',
243+
'Bristol',
244+
'Cambridge',
245+
'Canterbury',
246+
'Carlisle',
247+
'Chester',
248+
'Coventry',
249+
'Derby',
250+
'Durham',
251+
'Exeter',
252+
'Gloucester',
253+
'Kingston upon Hull',
254+
'Lancaster',
255+
'Leeds',
256+
'Leicester',
257+
'Liverpool',
258+
'Manchester',
259+
'Newcastle upon Tyne',
260+
'Norwich',
261+
'Nottingham',
262+
'Oxford',
263+
'Sheffield'
264+
]
265+
212266
// These are towns where searching by the name doesn't
213267
// return a high confidence UK location
214268
const unknownPlaces = [
@@ -218,7 +272,7 @@ const unknownPlaces = [
218272
]
219273

220274
// These are towns where searching by the Bing qualified name doesn't
221-
// return a high confidence location which matches the Bing name
275+
// return a location which matches the slugified Bing name
222276
const brokenPlaces = [
223277
'Kington' // => Kington, County of Herefordshire => none
224278
]
@@ -239,6 +293,8 @@ async function resultCheck (town) {
239293

240294
// These tests document known issues with bing search and, as such, they will
241295
// will hit bing and the sad path tests will fail (hence the use of skip)
296+
// They are retained as a useful check on Bing search and are intended to be run
297+
// ad-hoc (by selective removal of skip and the --grep option of lab
242298
describe.skip('location service integration tests', () => {
243299
// Helper function to dynamically generate tests
244300
const generateTests = (places, description) => {
@@ -254,6 +310,8 @@ describe.skip('location service integration tests', () => {
254310
describe('Happy path', () => {
255311
generateTests(villages, 'Villages: Searching by found name returns the same location')
256312
generateTests(towns, 'Towns: Searching by found name returns the same location')
313+
generateTests(counties, 'Counties: Searching by found name returns the same location')
314+
generateTests(cities, 'Cities: Searching by found name returns the same location')
257315
})
258316

259317
describe('Sad path: known Bing issues', () => {

0 commit comments

Comments
 (0)