{ "name": "search city/country", "priorityThresh": 1, "endpoint": "search", "notes": "these tests test functionality to match libpostal city/country analysis, these can be moved to a general placeholder test area", "tests": [ { "id": 1, "status": "pass", "user": "trescube", "type": "dev", "in": { "text": "Palora ecuador" }, "expected": { "properties": [ { "gid": "whosonfirst:locality:421177865", "locality": "Palora", "country": "Ecuador", "country_a": "ECU" } ] } }, { "id": 2, "status": "pass", "user": "trescube", "type": "dev", "in": { "text": "Tena ecuador" }, "expected": { "priorityThresh": 2, "properties": [ { "layer": "locality", "locality": "Tena", "country": "Ecuador", "country_a": "ECU" } ] } }, { "id": 3, "status": "pass", "user": "trescube", "type": "dev", "in": { "text": "Paris France" }, "expected": { "properties": [ { "layer": "locality", "locality": "Paris", "country": "France", "country_a": "FRA" } ] } }, { "id": 4, "status": "pass", "user": "trescube", "type": "dev", "in": { "text": "Paris France" }, "expected": { "properties": [ { "layer": "locality", "locality": "Paris", "country": "France", "country_a": "FRA" } ] } }, { "id": 5, "status": "pass", "user": "trescube", "type": "dev", "in": { "text": "Anthering, Austria" }, "expected": { "properties": [ { "layer": "locality", "locality": "Anthering", "country": "Austria", "country_a": "AUT" } ] } }, { "id": 6, "status": "pass", "user": "trescube", "type": "dev", "in": { "text": "Portoviejo ecu" }, "expected": { "properties": [ { "layer": "locality", "locality": "Portoviejo", "country": "Ecuador", "country_a": "ECU" } ] } }, { "id": 7, "status": "pass", "user": "trescube", "type": "dev", "in": { "text": "windhoek, namibia" }, "expected": { "properties": [ { "layer": "locality", "locality": "Windhoek", "country": "Namibia", "country_a": "NAM" } ] } }, { "id": 8, "status": "pass", "user": "trescube", "type": "dev", "in": { "text": "maseru, lesotho" }, "expected": { "priorityThresh": 2, "properties": [ { "layer": "locality", "locality": "Maseru", "country": "Lesotho", "country_a": "LSO" } ] } }, { "id": 9, "status": "pass", "user": "trescube", "type": "dev", "in": { "text": "lusaka, zambia" }, "expected": { "properties": [ { "layer": "locality", "locality": "Lusaka", "country": "Zambia", "country_a": "ZMB" } ] } }, { "id": 10, "status": "pass", "user": "trescube", "type": "dev", "notes": "WOF previously lacked 'Cairo' as an altname for the city: https://whosonfirst.mapzen.com/spelunker/id/421174399", "in": { "text": "Cairo, EGY" }, "expected": { "properties": [ { "layer": "locality", "locality": "Cairo", "country": "Egypt", "country_a": "EGY" } ] } }, { "id": 11, "status": "pass", "user": "trescube", "type": "dev", "notes": "region currently ranks higher than mid-size locality", "in": { "text": "toledo, spain" }, "expected": { "priorityThresh": 2, "properties": [ { "layer": "locality", "locality": "Toledo", "country": "Spain", "country_a": "ESP" } ] } }, { "id": 12, "status": "pass", "user": "trescube", "type": "dev", "in": { "text": "Sarajevo, Bosnia and Herzegovina" }, "expected": { "properties": [ { "layer": "locality", "locality": "Sarajevo", "country": "Bosnia and Herzegovina", "country_a": "BIH" } ] } }, { "id": 13, "status": "pass", "user": "trescube", "type": "dev", "in": { "text": "prague, czech republic" }, "expected": { "properties": [ { "layer": "locality", "locality": "Prague", "country": "Czechia", "country_a": "CZE" } ] } }, { "id": 14, "status": "pass", "user": "trescube", "type": "dev", "in": { "lang": "pl", "text": "Poznań, poland" }, "expected": { "properties": [ { "layer": "locality", "locality": "Poznań", "country": "Polska", "country_a": "POL" } ] } }, { "id": 15, "status": "pass", "user": "trescube", "type": "dev", "in": { "text": "Akmenė, lithuania" }, "expected": { "priorityThresh": 2, "properties": [ { "layer": "locality", "locality": "Akmenė", "country": "Lithuania", "country_a": "LTU" } ] } }, { "id": 16, "status": "pass", "user": "trescube", "type": "dev", "in": { "text": "mikkeli, finland" }, "expected": { "properties": [ { "layer": "locality", "locality": "Mikkeli", "country": "Finland", "country_a": "FIN" } ] } }, { "id": 17, "status": "pass", "user": "trescube", "type": "dev", "in": { "text": "beijing, china" }, "expected": { "properties": [ { "layer": "locality", "locality": "Beijing", "country": "China", "country_a": "CHN" } ] } }, { "id": 18, "status": "pass", "user": "trescube", "type": "dev", "in": { "text": "sendai, japan" }, "expected": { "properties": [ { "gid": "whosonfirst:locality:102031919", "locality": "Sendai-shi", "country": "Japan", "country_a": "JPN" } ] } }, { "id": 19, "status": "pass", "user": "trescube", "type": "dev", "in": { "text": "Vladivostok, russia" }, "expected": { "properties": [ { "layer": "locality", "locality": "Vladivostok", "country": "Russia", "country_a": "RUS" } ] } }, { "id": 20, "status": "pass", "user": "trescube", "type": "dev", "in": { "text": "truth or consequences, usa" }, "expected": { "properties": [ { "layer": "locality", "locality": "Truth Or Consequences", "region_a": "NM", "country": "United States", "country_a": "USA" } ] } }, { "id": 21, "status": "pass", "user": "trescube", "type": "dev", "in": { "text": "toronto, ca" }, "expected": { "properties": [ { "layer": "locality", "locality": "Toronto", "region_a": "ON", "country": "Canada", "country_a": "CAN" } ] } }, { "id": 22, "status": "pass", "user": "trescube", "type": "dev", "in": { "text": "yakima, us" }, "expected": { "properties": [ { "layer": "locality", "locality": "Yakima", "region_a": "WA", "country": "United States", "country_a": "USA" } ] } }, { "id": 23, "status": "pass", "user": "trescube", "type": "dev", "notes": "Bermuda is a dependency", "in": { "layers": "locality", "text": "hamilton, bermuda" }, "expected": { "properties": [ { "gid": "whosonfirst:locality:890442097", "locality": "Hamilton", "dependency": "Bermuda" } ] } }, { "id": 24, "status": "pass", "user": "trescube", "type": "dev", "notes": "American Samoa is a dependency", "in": { "text": "pago pago, American Samoa" }, "expected": { "properties": [ { "layer": "locality", "locality": "Pago Pago", "dependency": "American Samoa", "dependency_a": "ASM" } ] } }, { "id": 25, "status": "pass", "user": "trescube", "type": "dev", "notes": "Anguilla is a dependency", "in": { "layers": "locality", "text": "the valley, Anguilla" }, "expected": { "properties": [ { "gid": "whosonfirst:locality:890441875", "locality": "The Valley", "dependency": "Anguilla" } ] } }, { "id": 26, "status": "fail", "user": "trescube", "type": "dev", "notes": "New Caledonia is a dependency", "issue": "https://github.com/pelias/wof-admin-lookup/issues/156", "in": { "text": "Bourail, new caledonia" }, "expected": { "properties": [ { "layer": "locality", "locality": "Bourail", "dependency": "New Caledonia", "country": "France", "country_a": "FRA" } ] } }, { "id": 27, "status": "pass", "user": "trescube", "type": "dev", "notes": "region currently ranks higher than mid-size locality", "in": { "text": "phuket tha" }, "expected": { "priorityThresh": 2, "properties": [ { "layer": "locality", "locality": "Phuket", "country": "Thailand", "country_a": "THA" } ] } }, { "id": 28, "status": "pass", "user": "trescube", "type": "dev", "notes": "region altname currently ranks higher than mid-size locality", "in": { "text": "Vientiane, laos" }, "expected": { "priorityThresh": 2, "properties": [ { "layer": "locality", "locality": "Vientiane", "country": "Laos", "country_a": "LAO" } ] } }, { "id": 29, "status": "pass", "user": "trescube", "type": "dev", "in": { "text": "Dushanbe, TJK" }, "expected": { "properties": [ { "layer": "locality", "locality": "Dushanbe", "country": "Tajikistan", "country_a": "TJK" } ] } }, { "id": 30, "status": "pass", "user": "trescube", "type": "dev", "in": { "text": "Bishkek, Kyrgyzstan" }, "expected": { "properties": [ { "layer": "locality", "locality": "Bishkek", "country": "Kyrgyzstan", "country_a": "KGZ" } ] } }, { "id": 31, "status": "pass", "user": "trescube", "type": "dev", "notes": "mismatch should fallback to country", "in": { "text": "seattle, canada" }, "expected": { "properties": [ { "layer": "country", "country": "Canada", "country_a": "CAN" } ] } }, { "id": 32, "status": "pass", "user": "trescube", "type": "dev", "notes": "mismatch should fallback to country", "in": { "text": "socorro, thailand" }, "expected": { "properties": [ { "layer": "country", "country": "Thailand", "country_a": "THA" } ] } } ] }