parent
a6b44a1470
commit
e1ac1c4fdc
@ -82,6 +82,10 @@ When /^I route I should get$/ do |table|
|
|||||||
end
|
end
|
||||||
if table.headers.include? 'route'
|
if table.headers.include? 'route'
|
||||||
got['route'] = (instructions || '').strip
|
got['route'] = (instructions || '').strip
|
||||||
|
if table.headers.include?('alternative')
|
||||||
|
raise "*** No alternative found ***" unless json['found_alternative']
|
||||||
|
got['alternative'] = way_list json['alternative_instructions'].first
|
||||||
|
end
|
||||||
if table.headers.include?('distance')
|
if table.headers.include?('distance')
|
||||||
if row['distance']!=''
|
if row['distance']!=''
|
||||||
raise "*** Distance must be specied in meters. (ex: 250m)" unless row['distance'] =~ /\d+m/
|
raise "*** Distance must be specied in meters. (ex: 250m)" unless row['distance'] =~ /\d+m/
|
||||||
|
@ -52,6 +52,31 @@ Feature: Via points
|
|||||||
| a,c,f | ab,bcd,bcd,de,efg |
|
| a,c,f | ab,bcd,bcd,de,efg |
|
||||||
| a,c,f,h | ab,bcd,bcd,de,efg,efg,gh |
|
| a,c,f,h | ab,bcd,bcd,de,efg,efg,gh |
|
||||||
|
|
||||||
|
Scenario: Alternative via points
|
||||||
|
Given the node map
|
||||||
|
| | b | c | d | | |
|
||||||
|
| a | | | | | z |
|
||||||
|
| | g | h | i | j | |
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes |
|
||||||
|
| ab |
|
||||||
|
| bc |
|
||||||
|
| cd |
|
||||||
|
| dz |
|
||||||
|
| ag |
|
||||||
|
| gh |
|
||||||
|
| hi |
|
||||||
|
| ij |
|
||||||
|
| jz |
|
||||||
|
|
||||||
|
And the query options
|
||||||
|
| alt | true |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| waypoints | route | alternative |
|
||||||
|
| a,z | ab,bc,cd,dz | ag,gh,hi,ij,jz |
|
||||||
|
|
||||||
Scenario: Duplicate via point
|
Scenario: Duplicate via point
|
||||||
Given the node map
|
Given the node map
|
||||||
| x | | | | | |
|
| x | | | | | |
|
||||||
|
Loading…
Reference in New Issue
Block a user