Add a summary to each match result showing distance and duration.
Helpful for comparing how long the routing engine thinks the matched trace should take to travel.
This commit is contained in:
@@ -156,6 +156,7 @@ When /^I match with turns I should get$/ do |table|
|
||||
modes = mode_list json['matchings'][0]['instructions']
|
||||
times = time_list json['matchings'][0]['instructions']
|
||||
distances = distance_list json['matchings'][0]['instructions']
|
||||
summary = json['matchings'][0]['route_summary']
|
||||
end
|
||||
end
|
||||
|
||||
@@ -168,6 +169,9 @@ When /^I match with turns I should get$/ do |table|
|
||||
if table.headers.include? '#' # comment column
|
||||
got['#'] = row['#'] # copy value so it always match
|
||||
end
|
||||
if table.headers.include? 'duration'
|
||||
got['duration'] = "#{summary["total_time"]}"
|
||||
end
|
||||
|
||||
sub_matchings = []
|
||||
if response.code == "200"
|
||||
|
||||
Reference in New Issue
Block a user