Cucumber test support for alternatives count parameter

This commit is contained in:
Lev Dragunov
2017-01-17 13:49:31 +03:00
committed by Patrick Niklaus
parent 5be6f8959a
commit 421d336b0f
3 changed files with 30 additions and 1 deletions
+9 -1
View File
@@ -39,7 +39,8 @@ module.exports = function () {
duration = '',
annotation = '',
geometry = '',
OSMIDs = '';
OSMIDs = '',
alternatives = '';
if (res.statusCode === 200) {
@@ -95,6 +96,10 @@ module.exports = function () {
if (json.matchings.length != 1) throw new Error('*** Checking geometry only supported for matchings with one subtrace');
geometry = json.matchings[0].geometry;
}
if (headers.has('alternatives')) {
alternatives = this.alternativesList(json);
}
}
if (headers.has('turns')) {
@@ -137,6 +142,9 @@ module.exports = function () {
got['OSM IDs'] = OSMIDs;
}
if (headers.has('alternatives')) {
got['alternatives'] = alternatives;
}
var ok = true;
var encodedResult = '',
extendedTarget = '';