From 6a01670964d2a4d52af3f649beb2f030d64a156c Mon Sep 17 00:00:00 2001 From: Joxit Date: Wed, 2 Oct 2019 16:01:57 +0200 Subject: [PATCH] Add tests for multi lang support in autocomplete --- test_cases/autocomplete_multi_lang.json | 235 ++++++++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 test_cases/autocomplete_multi_lang.json diff --git a/test_cases/autocomplete_multi_lang.json b/test_cases/autocomplete_multi_lang.json new file mode 100644 index 0000000..a65980f --- /dev/null +++ b/test_cases/autocomplete_multi_lang.json @@ -0,0 +1,235 @@ +{ + "name": "Autocomplete Multi Lang", + "priorityThresh": 1, + "endpoint": "autocomplete", + "notes": "https://github.com/pelias/api/issues/1296", + "tests": [ + { + "id": "1-1", + "status": "pass", + "user": "Joxit", + "in": { + "lang": "nl", + "text": "Pari" + }, + "expected": { + "priorityThresh": 3, + "properties": [ + { + "layer": "locality", + "country": "Frankrijk", + "name": "Parijs" + } + ] + } + }, + { + "id": "1-2", + "status": "fail", + "user": "Joxit", + "in": { + "lang": "nl", + "text": "Parij" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "country": "Frankrijk", + "name": "Parijs" + } + ] + } + }, + { + "id": "1-3", + "status": "fail", + "user": "Joxit", + "in": { + "lang": "nl", + "text": "Parijs" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "country": "Frankrijk", + "name": "Parijs" + } + ] + } + }, + { + "id": "2-1", + "status": "fail", + "user": "Joxit", + "issue": "https://github.com/pelias/pelias/issues/767", + "in": { + "lang": "de", + "text": "Kair" + }, + "expected": { + "properties": [ + { + "layer": "region", + "country": "Ägypten", + "name": "Kairo" + } + ] + } + }, + { + "id": "3-1", + "status": "fail", + "user": "Joxit", + "in": { + "lang": "fr", + "text": "Londres" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "country": "Royaume-Uni", + "name": "Londres" + } + ] + } + }, + { + "id": "4-1", + "status": "fail", + "user": "Joxit", + "in": { + "lang": "zh", + "text": "孟菲斯及其" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "country": "埃及", + "region": "吉薩省", + "name": "孟菲斯及其墓地金字塔" + } + ] + } + }, + { + "id": "5-1", + "status": "fail", + "user": "Joxit", + "in": { + "lang": "de", + "text": "Marokko" + }, + "expected": { + "properties": [ + { + "layer": "country", + "country": "Marokko", + "name": "Marokko" + } + ] + } + }, + { + "id": "6-1", + "status": "fail", + "user": "Joxit", + "issue": "https://github.com/pelias/pelias/issues/699", + "in": { + "lang": "en", + "text": "Museum of Kosovo" + }, + "expected": { + "priorityThresh": 10, + "properties": [ + { + "layer": "venue", + "country": "Kosovo", + "locality": "Pristina", + "name": "Museum of Kosovo" + } + ] + } + }, + { + "id": "6-2", + "status": "pass", + "user": "Joxit", + "issue": "https://github.com/pelias/pelias/issues/699", + "in": { + "lang": "en", + "text": "Muzeu i Kosovës" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "country": "Kosovo", + "name": "Museum of Kosovo" + } + ] + } + }, + { + "id": "6-3", + "status": "fail", + "user": "Joxit", + "issue": "https://github.com/pelias/pelias/issues/699", + "in": { + "lang": "de", + "text": "Museum des Kosovo" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "country": "Kosovo", + "locality": "Priština", + "name": "Museum des Kosovo" + } + ] + } + }, + { + "id": "7-1", + "status": "fail", + "user": "Joxit", + "issue": "https://github.com/pelias/pelias/issues/663", + "in": { + "lang": "ru", + "text": "8 марта" + }, + "expected": { + "priorityThresh": 5, + "properties": [ + { + "layer": "venue", + "name": "8 марта" + } + ] + } + }, + { + "id": "7-2", + "status": "fail", + "user": "Joxit", + "issue": "https://github.com/pelias/pelias/issues/663", + "in": { + "lang": "ru", + "text": "8 Марта, Белоруссия" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "country": "Белоруссия", + "name": "8 марта" + } + ] + } + } + ] +}