Skip to content

Commit

Permalink
Add search focus.point tests
Browse files Browse the repository at this point in the history
In particular, this tests for searching for postal codes as mentioned in
pelias/api#1206
  • Loading branch information
orangejulius committed Oct 13, 2018
1 parent db808a0 commit 0b7c1cb
Showing 1 changed file with 86 additions and 0 deletions.
86 changes: 86 additions & 0 deletions test_cases/search_focus.json
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"
}
]
}
}
]
}

0 comments on commit 0b7c1cb

Please sign in to comment.