Skip to content

Commit

Permalink
Add venue translation test cases
Browse files Browse the repository at this point in the history
As of pelias/api#1301, it is now possible to _return translated results_ when searching for venues.

This adds a new test suite of venue translation test cases, and renames
the `placeholder altnames` test case to `admin translations` to match
it.
  • Loading branch information
orangejulius committed May 28, 2019
1 parent a64fab9 commit e77e3c7
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Placeholder alt names",
"name": "Admin translations",
"priorityThresh": 2,
"tests": [
{
Expand Down
110 changes: 110 additions & 0 deletions test_cases/venue_translations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"name": "Venue translations",
"priorityThresh": 2,
"tests": [
{
"id": 0,
"status": "pass",
"user": "orangejulius",
"description": "venue with multiple translations should return default translation with no lang param",
"in": {
"text": "عمرو إبن العاص, cairo, egypt",
"layers": "venue"
},
"expected": {
"properties": [
{
"name": "عمرو إبن العاص",
"layer": "venue",
"country": "Egypt",
"country_a": "EGY"
}
]
}
},
{
"id": 1,
"status": "pass",
"user": "orangejulius",
"description": "venue with multiple translations should return english translation with lang param",
"in": {
"text": "عمرو إبن العاص, cairo, egypt",
"layers": "venue",
"lang": "en"
},
"expected": {
"properties": [
{
"name": "Mosque of Amr ibn al-As",
"layer": "venue",
"country": "Egypt",
"country_a": "EGY"
}
]
}
},
{
"id": 2,
"status": "pass",
"user": "orangejulius",
"description": "venue with multiple translations should return spanish translation with lang param",
"in": {
"text": "عمرو إبن العاص, cairo, egypt",
"layers": "venue",
"lang": "es"
},
"expected": {
"properties": [
{
"name": "Mezquita de Amr",
"layer": "venue",
"country": "Egipto",
"country_a": "EGY"
}
]
}
},
{
"id": 3,
"status": "pass",
"user": "orangejulius",
"description": "venue with multiple translations should return arabic translation with lang param",
"in": {
"text": "عمرو إبن العاص, cairo, egypt",
"layers": "venue",
"lang": "ar"
},
"expected": {
"properties": [
{
"name": "عمرو إبن العاص",
"layer": "venue",
"country": "مصر",
"country_a": "EGY"
}
]
}
},
{
"id": 4,
"status": "pass",
"user": "orangejulius",
"description": "venue with multiple translations should return russian translation with lang param",
"in": {
"text": "statue of liberty, manhattan",
"layers": "venue",
"lang": "ru"
},
"expected": {
"properties": [
{
"name": "Статуя Свободы",
"layer": "venue",
"borough": "Манхэттен",
"country_a": "USA"
}
]
}
}
]
}

0 comments on commit e77e3c7

Please sign in to comment.