Skip to content

Commit 9fa1a17

Browse files
committed
fix flaky geonames test (#3182)
* fix flaky geonames test * handle feedback
1 parent d15b4f5 commit 9fa1a17

File tree

1 file changed

+25
-46
lines changed

1 file changed

+25
-46
lines changed

features/places.feature

Lines changed: 25 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,63 +2,28 @@ Feature: Places
22

33
@auth
44
Scenario: Places autocomplete
5-
When we get "/places_autocomplete?name=koberice&lang=cs"
5+
When we get "/places_autocomplete?name=brno&lang=cs"
66
# we use __any_value__ for states because we
7-
# can get either "XXX" or "XXX kraj" (e.g. "Olomoucký kraj" or "Olomoucký")
8-
Then we get list with 3 items
7+
# can get either "XXX" or "XXX kraj" (e.g. "Jihomoravský kraj" or "Jihomoravský")
8+
Then we get list with 1+ items
99
"""
1010
{
1111
"_items": [
1212
{
13-
"code": "3073494",
13+
"code": "3078610",
1414
"continent_code": "",
1515
"country": "\u010cesko",
1616
"country_code": "CZ",
1717
"feature_class": "P",
1818
"location": {
19-
"lat": 49.3719,
20-
"lon": 17.11262
19+
"lat": 49.19522,
20+
"lon": 16.60796
2121
},
22-
"name": "Kobe\u0159ice",
22+
"name": "Brno",
2323
"region": "",
2424
"region_code": "",
2525
"scheme": "geonames",
26-
"state": "__any_value__",
27-
"state_code": "84"
28-
},
29-
{
30-
"code": "3073495",
31-
"continent_code": "",
32-
"country": "\u010cesko",
33-
"country_code": "CZ",
34-
"feature_class": "P",
35-
"location": {
36-
"lat": 49.08713,
37-
"lon": 16.88324
38-
},
39-
"name": "Kobe\u0159ice",
40-
"region": "",
41-
"region_code": "",
42-
"scheme": "geonames",
43-
"state": "__any_value__",
4426
"state_code": "78"
45-
},
46-
{
47-
"code": "3073493",
48-
"continent_code": "",
49-
"country": "\u010cesko",
50-
"country_code": "CZ",
51-
"feature_class": "P",
52-
"location": {
53-
"lat": 49.98548,
54-
"lon": 18.05212
55-
},
56-
"name": "Kobe\u0159ice",
57-
"region": "",
58-
"region_code": "",
59-
"scheme": "geonames",
60-
"state": "__any_value__",
61-
"state_code": "85"
6227
}
6328
]
6429
}
@@ -72,7 +37,21 @@ Feature: Places
7237
"GEONAMES_FEATURE_CLASSES": ["P", "A"]
7338
}
7439
"""
75-
When we get "/places_autocomplete?name=koberice&lang=cs"
76-
Then we get list with 6 items
77-
When we get "/places_autocomplete?name=koberice&lang=cs&featureClass=P"
78-
Then we get list with 3 items
40+
When we get "/places_autocomplete?name=jihomoravsky&lang=cs"
41+
Then we get list with 1+ items
42+
"""
43+
{
44+
"_items": [
45+
{
46+
"code": "3339536",
47+
"country_code": "CZ",
48+
"feature_class": "A",
49+
"name": "Jihomoravsk\u00fd",
50+
"scheme": "geonames",
51+
"state_code": "78"
52+
}
53+
]
54+
}
55+
"""
56+
When we get "/places_autocomplete?name=jihomoravsky&lang=cs&featureClass=P"
57+
Then we get list with 0 items

0 commit comments

Comments
 (0)