-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In particular, this tests for searching for postal codes as mentioned in pelias/api#1206
- Loading branch information
1 parent
db808a0
commit 0b7c1cb
Showing
1 changed file
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
{ | ||
"name": "search focus.point", | ||
"priorityThresh": 1, | ||
"endpoint": "search", | ||
"tests": [ | ||
{ | ||
"id": 1, | ||
"status": "fail", | ||
"in": { | ||
"focus.point.lat": 40.744243, | ||
"focus.point.lon": -73.990342, | ||
"text": "berlin" | ||
}, | ||
"description": "searching for Berlin from NYC should prefer the one in Connecticut. Note: it's unclear we want this functionality, and it currently doesn't work because Placeholder does not support focus.point queries", | ||
"expected": { | ||
"properties": [ | ||
{ | ||
"name": "Berlin", | ||
"layer": "locality", | ||
"region": "Connecticut" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"id": 2, | ||
"status": "pass", | ||
"in": { | ||
"focus.point.lat": 42.64, | ||
"focus.point.lon": -84.7, | ||
"text": "10010" | ||
}, | ||
"description": "searching for a NYC postal code from Michigan should return that postal code before any other countries", | ||
"issue": "https://github.com/pelias/api/issues/1206", | ||
"expected": { | ||
"properties": [ | ||
{ | ||
"name": "10010", | ||
"layer": "postalcode", | ||
"region": "New York" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"id": 3, | ||
"status": "pass", | ||
"in": { | ||
"focus.point.lat": 60.20, | ||
"focus.point.lon": 24.99, | ||
"text": "93277" | ||
}, | ||
"description": "searching for a Finish/American postal code from Helsinki should return the Finish version before other countries", | ||
"issue": "https://github.com/pelias/api/issues/1206", | ||
"expected": { | ||
"properties": [ | ||
{ | ||
"name": "93277", | ||
"layer": "postalcode", | ||
"country": "Finland" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"id": 4, | ||
"status": "pass", | ||
"in": { | ||
"focus.point.lat": 44.05, | ||
"focus.point.lon": -121.30, | ||
"text": "93277" | ||
}, | ||
"description": "searching for a Finish/American postal code from Bend, Oregon should return the American version before other countries", | ||
"issue": "https://github.com/pelias/api/issues/1206", | ||
"expected": { | ||
"properties": [ | ||
{ | ||
"name": "93277", | ||
"layer": "postalcode", | ||
"country_a": "USA" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |