Mode changes, guidance comments, fix turns
This commit is contained in:
parent
908e3a2af6
commit
126d2f85ac
@ -1,5 +1,5 @@
|
||||
module.exports = {
|
||||
default: '--require features --tags ~@todo --tags ~@bug --tags ~@stress',
|
||||
default: '--require features --tags ~@todo --tags ~@bug --tags ~@stress --tags ~@mokob',
|
||||
verify: '--require features --tags ~@todo --tags ~@bug --tags ~@stress -f progress',
|
||||
jenkins: '--require features --tags ~@todo --tags ~@bug --tags ~@stress --tags ~@options -f progress',
|
||||
bugs: '--require features --tags @bug',
|
||||
|
@ -4,7 +4,7 @@ Feature: Bike - Squares and other areas
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
|
||||
@square
|
||||
@square @mokob @2154
|
||||
Scenario: Bike - Route along edge of a squares
|
||||
Given the node map
|
||||
| x | |
|
||||
@ -50,7 +50,7 @@ Feature: Bike - Squares and other areas
|
||||
| d | a | xa |
|
||||
| a | d | xa |
|
||||
|
||||
@parking
|
||||
@parking @mokob @2154
|
||||
Scenario: Bike - parking areas
|
||||
Given the node map
|
||||
| e | | | f |
|
||||
@ -77,7 +77,7 @@ Feature: Bike - Squares and other areas
|
||||
| d | a | abcda |
|
||||
| a | d | abcda |
|
||||
|
||||
@train @platform
|
||||
@train @platform @mokob @2154
|
||||
Scenario: Bike - railway platforms
|
||||
Given the node map
|
||||
| x | a | b | y |
|
||||
|
@ -4,6 +4,7 @@ Feature: Bicycle - Handle movable bridge
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
|
||||
@mokob @2155
|
||||
Scenario: Bicycle - Use a ferry route
|
||||
Given the node map
|
||||
| a | b | c | | |
|
||||
@ -17,16 +18,17 @@ Feature: Bicycle - Handle movable bridge
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg | 1,5,1 |
|
||||
| b | f | abc,cde,efg | 1,5,1 |
|
||||
| e | c | cde | 5 |
|
||||
| e | b | cde,abc | 5,1 |
|
||||
| e | a | cde,abc | 5,1 |
|
||||
| c | e | cde | 5 |
|
||||
| c | f | cde,efg | 5,1 |
|
||||
| c | g | cde,efg | 5,1 |
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg | cycling,movable bridge,cycling |
|
||||
| b | f | abc,cde,efg | cycling,movable bridge,cycling |
|
||||
| e | c | cde | movable bridge |
|
||||
| e | b | cde,abc | movable bridge,cycling |
|
||||
| e | a | cde,abc | movable bridge,cycling |
|
||||
| c | e | cde | movable bridge |
|
||||
| c | f | cde,efg | movable bridge,cycling |
|
||||
| c | g | cde,efg | movable bridge,cycling |
|
||||
|
||||
@mokob @2155
|
||||
Scenario: Bicycle - Properly handle durations
|
||||
Given the node map
|
||||
| a | b | c | | |
|
||||
@ -40,8 +42,8 @@ Feature: Bicycle - Handle movable bridge
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg | 1,5,1 | 5 km/h |
|
||||
| b | f | abc,cde,efg | 1,5,1 | 4 km/h |
|
||||
| c | e | cde | 5 | 2 km/h |
|
||||
| e | c | cde | 5 | 2 km/h |
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg | cycling,movable bridge,cycling | 5 km/h |
|
||||
| b | f | abc,cde,efg | cycling,movable bridge,cycling | 4 km/h |
|
||||
| c | e | cde | movable bridge | 2 km/h |
|
||||
| e | c | cde | movable bridge | 2 km/h |
|
||||
|
@ -1,12 +1,6 @@
|
||||
@routing @bicycle @mode
|
||||
Feature: Bike - Mode flag
|
||||
|
||||
# bicycle modes:
|
||||
# 1 bike
|
||||
# 2 pushing
|
||||
# 3 ferry
|
||||
# 4 train
|
||||
|
||||
Background:
|
||||
Given the profile "bicycle"
|
||||
|
||||
@ -22,13 +16,13 @@ Feature: Bike - Mode flag
|
||||
| cd | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,3,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,3,1 |
|
||||
| c | a | bc,ab | head,left,destination | 3,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,3 |
|
||||
| a | c | ab,bc | head,right,destination | 1,3 |
|
||||
| b | d | bc,cd | head,left,destination | 3,1 |
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | cycling,ferry,cycling |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | cycling,ferry,cycling |
|
||||
| c | a | bc,ab | head,left,destination | ferry,cycling |
|
||||
| d | b | cd,bc | head,right,destination | cycling,ferry |
|
||||
| a | c | ab,bc | head,right,destination | cycling,ferry |
|
||||
| b | d | bc,cd | head,left,destination | ferry,cycling |
|
||||
|
||||
Scenario: Bike - Mode when using a train
|
||||
Given the node map
|
||||
@ -42,14 +36,15 @@ Feature: Bike - Mode flag
|
||||
| cd | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,4,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,4,1 |
|
||||
| c | a | bc,ab | head,left,destination | 4,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,4 |
|
||||
| a | c | ab,bc | head,right,destination | 1,4 |
|
||||
| b | d | bc,cd | head,left,destination | 4,1 |
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | cycling,train,cycling |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | cycling,train,cycling |
|
||||
| c | a | bc,ab | head,left,destination | train,cycling |
|
||||
| d | b | cd,bc | head,right,destination | cycling,train |
|
||||
| a | c | ab,bc | head,right,destination | cycling,train |
|
||||
| b | d | bc,cd | head,left,destination | train,cycling |
|
||||
|
||||
@mokobreview
|
||||
Scenario: Bike - Mode when pushing bike against oneways
|
||||
Given the node map
|
||||
| a | b | |
|
||||
@ -62,13 +57,13 @@ Feature: Bike - Mode flag
|
||||
| cd | primary | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,straight,straight,destination | 1,1,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 |
|
||||
| c | a | bc,ab | head,left,destination | 2,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,2 |
|
||||
| a | c | ab,bc | head,straight,destination | 1,1 |
|
||||
| b | d | bc,cd | head,straight,destination | 1,1 |
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | cycling,cycling,cycling |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | cycling,pushing bike,cycling |
|
||||
| c | a | bc,ab | head,left,destination | pushing bike,cycling |
|
||||
| d | b | cd,bc | head,right,destination | cycling,pushing bike |
|
||||
| a | c | ab,bc | head,right,destination | cycling,cycling |
|
||||
| b | d | bc,cd | head,left,destination | cycling,cycling |
|
||||
|
||||
Scenario: Bike - Mode when pushing on pedestrain streets
|
||||
Given the node map
|
||||
@ -82,13 +77,13 @@ Feature: Bike - Mode flag
|
||||
| cd | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,2,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 |
|
||||
| c | a | bc,ab | head,left,destination | 2,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,2 |
|
||||
| a | c | ab,bc | head,right,destination | 1,2 |
|
||||
| b | d | bc,cd | head,left,destination | 2,1 |
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | cycling,pushing bike,cycling |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | cycling,pushing bike,cycling |
|
||||
| c | a | bc,ab | head,left,destination | pushing bike,cycling |
|
||||
| d | b | cd,bc | head,right,destination | cycling,pushing bike |
|
||||
| a | c | ab,bc | head,right,destination | cycling,pushing bike |
|
||||
| b | d | bc,cd | head,left,destination | pushing bike,cycling |
|
||||
|
||||
Scenario: Bike - Mode when pushing on pedestrain areas
|
||||
Given the node map
|
||||
@ -103,12 +98,12 @@ Feature: Bike - Mode flag
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | f | ab,bcd,df | 1,2,1 |
|
||||
| f | a | df,bcd,ab | 1,2,1 |
|
||||
| d | a | bcd,ab | 2,1 |
|
||||
| f | b | df,bcd | 1,2 |
|
||||
| a | d | ab,bcd | 1,2 |
|
||||
| b | f | bcd,df | 2,1 |
|
||||
| a | f | ab,bcd,df | cycling,pushing bike,cycling |
|
||||
| f | a | df,bcd,ab | cycling,pushing bike,cycling |
|
||||
| d | a | bcd,ab | pushing bike,cycling |
|
||||
| f | b | df,bcd | cycling,pushing bike |
|
||||
| a | d | ab,bcd | cycling,pushing bike |
|
||||
| b | f | bcd,df | pushing bike,cycling |
|
||||
|
||||
Scenario: Bike - Mode when pushing on steps
|
||||
Given the node map
|
||||
@ -122,13 +117,13 @@ Feature: Bike - Mode flag
|
||||
| cd | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,2,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 |
|
||||
| c | a | bc,ab | head,left,destination | 2,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,2 |
|
||||
| a | c | ab,bc | head,right,destination | 1,2 |
|
||||
| b | d | bc,cd | head,left,destination | 2,1 |
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | cycling,pushing bike,cycling |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | cycling,pushing bike,cycling |
|
||||
| c | a | bc,ab | head,left,destination | pushing bike,cycling |
|
||||
| d | b | cd,bc | head,right,destination | cycling,pushing bike |
|
||||
| a | c | ab,bc | head,right,destination | cycling,pushing bike |
|
||||
| b | d | bc,cd | head,left,destination | pushing bike,cycling |
|
||||
|
||||
Scenario: Bike - Mode when bicycle=dismount
|
||||
Given the node map
|
||||
@ -142,13 +137,13 @@ Feature: Bike - Mode flag
|
||||
| cd | primary | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,2,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 |
|
||||
| c | a | bc,ab | head,left,destination | 2,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,2 |
|
||||
| a | c | ab,bc | head,right,destination | 1,2 |
|
||||
| b | d | bc,cd | head,left,destination | 2,1 |
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | cycling,pushing bike,cycling |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | cycling,pushing bike,cycling |
|
||||
| c | a | bc,ab | head,left,destination | pushing bike,cycling |
|
||||
| d | b | cd,bc | head,right,destination | cycling,pushing bike |
|
||||
| a | c | ab,bc | head,right,destination | cycling,pushing bike |
|
||||
| b | d | bc,cd | head,left,destination | pushing bike,cycling |
|
||||
|
||||
Scenario: Bicycle - Modes when starting on forward oneway
|
||||
Given the node map
|
||||
@ -159,9 +154,9 @@ Feature: Bike - Mode flag
|
||||
| ab | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | b | ab | 1 |
|
||||
| b | a | ab | 2 |
|
||||
| from | to | route | modes |
|
||||
| a | b | ab | cycling |
|
||||
| b | a | ab | pushing bike |
|
||||
|
||||
Scenario: Bicycle - Modes when starting on reverse oneway
|
||||
Given the node map
|
||||
@ -172,6 +167,6 @@ Feature: Bike - Mode flag
|
||||
| ab | -1 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | b | ab | 2 |
|
||||
| b | a | ab | 1 |
|
||||
| from | to | route | modes |
|
||||
| a | b | ab | pushing bike |
|
||||
| b | a | ab | cycling |
|
||||
|
@ -4,6 +4,7 @@ Feature: Car - Handle movable bridge
|
||||
Background:
|
||||
Given the profile "car"
|
||||
|
||||
@mokob @2155
|
||||
Scenario: Car - Use a ferry route
|
||||
Given the node map
|
||||
| a | b | c | | |
|
||||
@ -18,15 +19,16 @@ Feature: Car - Handle movable bridge
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg | 1,3,1 |
|
||||
| b | f | abc,cde,efg | 1,3,1 |
|
||||
| e | c | cde | 3 |
|
||||
| e | b | cde,abc | 3,1 |
|
||||
| e | a | cde,abc | 3,1 |
|
||||
| c | e | cde | 3 |
|
||||
| c | f | cde,efg | 3,1 |
|
||||
| c | g | cde,efg | 3,1 |
|
||||
| a | g | abc,cde,efg | driving,movable bridge,driving |
|
||||
| b | f | abc,cde,efg | driving,movable bridge,driving |
|
||||
| e | c | cde | movable bridge |
|
||||
| e | b | cde,abc | movable bridge,driving |
|
||||
| e | a | cde,abc | movable bridge,driving |
|
||||
| c | e | cde | movable bridge |
|
||||
| c | f | cde,efg | movable bridge,driving |
|
||||
| c | g | cde,efg | movable bridge,driving |
|
||||
|
||||
@mokob @2155
|
||||
Scenario: Car - Properly handle durations
|
||||
Given the node map
|
||||
| a | b | c | | |
|
||||
@ -40,8 +42,8 @@ Feature: Car - Handle movable bridge
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg | 1,3,1 | 7 km/h |
|
||||
| b | f | abc,cde,efg | 1,3,1 | 5 km/h |
|
||||
| c | e | cde | 3 | 2 km/h |
|
||||
| e | c | cde | 3 | 2 km/h |
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg | driving,movable bridge,driving | 7 km/h |
|
||||
| b | f | abc,cde,efg | driving,movable bridge,driving | 5 km/h |
|
||||
| c | e | cde | movable bridge | 2 km/h |
|
||||
| e | c | cde | movable bridge | 2 km/h |
|
||||
|
@ -17,15 +17,15 @@ Feature: Car - Handle ferry routes
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg | 1,2,1 |
|
||||
| b | f | abc,cde,efg | 1,2,1 |
|
||||
| e | c | cde | 2 |
|
||||
| e | b | cde,abc | 2,1 |
|
||||
| e | a | cde,abc | 2,1 |
|
||||
| c | e | cde | 2 |
|
||||
| c | f | cde,efg | 2,1 |
|
||||
| c | g | cde,efg | 2,1 |
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg | driving,ferry,driving |
|
||||
| b | f | abc,cde,efg | driving,ferry,driving |
|
||||
| e | c | cde | ferry |
|
||||
| e | b | cde,abc | ferry,driving |
|
||||
| e | a | cde,abc | ferry,driving |
|
||||
| c | e | cde | ferry |
|
||||
| c | f | cde,efg | ferry,driving |
|
||||
| c | g | cde,efg | ferry,driving |
|
||||
|
||||
Scenario: Car - Properly handle simple durations
|
||||
Given the node map
|
||||
@ -40,11 +40,11 @@ Feature: Car - Handle ferry routes
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg | 1,2,1 | 25 km/h |
|
||||
| b | f | abc,cde,efg | 1,2,1 | 20 km/h |
|
||||
| c | e | cde | 2 | 12 km/h |
|
||||
| e | c | cde | 2 | 12 km/h |
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg | driving,ferry,driving | 25 km/h |
|
||||
| b | f | abc,cde,efg | driving,ferry,driving | 20 km/h |
|
||||
| c | e | cde | ferry | 12 km/h |
|
||||
| e | c | cde | ferry | 12 km/h |
|
||||
|
||||
Scenario: Car - Properly handle ISO 8601 durations
|
||||
Given the node map
|
||||
@ -59,8 +59,8 @@ Feature: Car - Handle ferry routes
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg | 1,2,1 | 25 km/h |
|
||||
| b | f | abc,cde,efg | 1,2,1 | 20 km/h |
|
||||
| c | e | cde | 2 | 12 km/h |
|
||||
| e | c | cde | 2 | 12 km/h |
|
||||
| from | to | route | modes | speed |
|
||||
| a | g | abc,cde,efg | driving,ferry,driving | 25 km/h |
|
||||
| b | f | abc,cde,efg | driving,ferry,driving | 20 km/h |
|
||||
| c | e | cde | ferry | 12 km/h |
|
||||
| e | c | cde | ferry | 12 km/h |
|
||||
|
@ -3,6 +3,7 @@ Feature: Car - Mode flag
|
||||
Background:
|
||||
Given the profile "car"
|
||||
|
||||
@mokob @2155
|
||||
Scenario: Car - Mode when using a ferry
|
||||
Given the node map
|
||||
| a | b | |
|
||||
@ -15,14 +16,15 @@ Feature: Car - Mode flag
|
||||
| cd | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,2,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 |
|
||||
| c | a | bc,ab | head,left,destination | 2,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,2 |
|
||||
| a | c | ab,bc | head,right,destination | 1,2 |
|
||||
| b | d | bc,cd | head,left,destination | 2,1 |
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | driving,ferry,driving |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | driving,ferry,driving |
|
||||
| c | a | bc,ab | head,left,destination | ferry,driving |
|
||||
| d | b | cd,bc | head,right,destination | driving,ferry |
|
||||
| a | c | ab,bc | head,right,destination | driving,ferry |
|
||||
| b | d | bc,cd | head,left,destination | ferry,driving |
|
||||
|
||||
@mokob @2155
|
||||
Scenario: Car - Snapping when using a ferry
|
||||
Given the node map
|
||||
| a | b | | c | d | | e | f |
|
||||
@ -34,7 +36,7 @@ Feature: Car - Mode flag
|
||||
| ef | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes | time |
|
||||
| c | d | bcde | head,destination | 2 | 600s |
|
||||
| from | to | route | turns | modes | time |
|
||||
| c | d | bcde | head,destination | ferry | 600s |
|
||||
|
||||
|
||||
|
@ -4,6 +4,7 @@ Feature: Foot - Handle ferry routes
|
||||
Background:
|
||||
Given the profile "foot"
|
||||
|
||||
@mokob @2155
|
||||
Scenario: Foot - Ferry route
|
||||
Given the node map
|
||||
| a | b | c | | |
|
||||
@ -17,15 +18,15 @@ Feature: Foot - Handle ferry routes
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg | 1,2,1 |
|
||||
| b | f | abc,cde,efg | 1,2,1 |
|
||||
| e | c | cde | 2 |
|
||||
| e | b | cde,abc | 2,1 |
|
||||
| e | a | cde,abc | 2,1 |
|
||||
| c | e | cde | 2 |
|
||||
| c | f | cde,efg | 2,1 |
|
||||
| c | g | cde,efg | 2,1 |
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg | walking,ferry,walking |
|
||||
| b | f | abc,cde,efg | walking,ferry,walking |
|
||||
| e | c | cde | ferry |
|
||||
| e | b | cde,abc | ferry,walking |
|
||||
| e | a | cde,abc | ferry,walking |
|
||||
| c | e | cde | ferry |
|
||||
| c | f | cde,efg | ferry,walking |
|
||||
| c | g | cde,efg | ferry,walking |
|
||||
|
||||
Scenario: Foot - Ferry duration, single node
|
||||
Given the node map
|
||||
@ -46,6 +47,7 @@ Feature: Foot - Handle ferry routes
|
||||
| bg | | ferry | yes | 1:00 |
|
||||
| bi | | ferry | yes | 10:00 |
|
||||
|
||||
@mokob @2155
|
||||
Scenario: Foot - Ferry duration, multiple nodes
|
||||
Given the node map
|
||||
| x | | | | | y |
|
||||
|
@ -131,9 +131,9 @@ module.exports = function () {
|
||||
};
|
||||
|
||||
this.turnList = (instructions) => {
|
||||
// console.log(instructions.legs[0].steps)
|
||||
return instructions.legs.reduce((m, v) => m.concat(v.steps), [])
|
||||
.filter(v => v.maneuver.modifier)
|
||||
.map(v => v.maneuver.modifier)
|
||||
.map(v => v.maneuver.type === 'depart' ? 'head' : v.maneuver.type === 'arrive' ? 'destination' : v.maneuver.modifier)
|
||||
.join(',');
|
||||
};
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
Feature: Testbot - Travel mode
|
||||
|
||||
# testbot modes:
|
||||
# 1 normal
|
||||
# 1 driving
|
||||
# 2 route
|
||||
# 3 river downstream
|
||||
# 4 river upstream
|
||||
@ -12,6 +12,7 @@ Feature: Testbot - Travel mode
|
||||
Background:
|
||||
Given the profile "testbot"
|
||||
|
||||
@mokob @2166
|
||||
Scenario: Testbot - Always announce mode change
|
||||
Given the node map
|
||||
| a | b | c | d |
|
||||
@ -23,10 +24,11 @@ Feature: Testbot - Travel mode
|
||||
| cd | residential | foo |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | d | foo,foo,foo | 1,3,1 |
|
||||
| b | d | foo,foo | 3,1 |
|
||||
| from | to | route | modes |
|
||||
| a | d | foo,foo,foo | driving,river downstream,driving |
|
||||
| b | d | foo,foo | river downstream,driving |
|
||||
|
||||
@mokob @2166
|
||||
Scenario: Testbot - Compressed Modes
|
||||
Given the node map
|
||||
| a | b | c | d | e | f | g |
|
||||
@ -38,10 +40,11 @@ Feature: Testbot - Travel mode
|
||||
| efg | residential | solid |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes | turns |
|
||||
| a | g | road,liquid,solid | 1,3,1 | head,straight,straight,destination |
|
||||
| c | g | liquid,solid | 3,1 | head,straight,destination |
|
||||
| from | to | route | modes | turns |
|
||||
| a | g | road,liquid,solid | driving,river downstream,driving | head,straight,straight,destination |
|
||||
| c | g | liquid,solid | river downstream,driving | head,straight,destination |
|
||||
|
||||
@mokob @2166
|
||||
Scenario: Testbot - Modes in each direction, different forward/backward speeds
|
||||
Given the node map
|
||||
| | 0 | 1 | |
|
||||
@ -52,15 +55,15 @@ Feature: Testbot - Travel mode
|
||||
| ab | river | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | 0 | ab | 3 |
|
||||
| a | b | ab | 3 |
|
||||
| 0 | 1 | ab | 3 |
|
||||
| 0 | b | ab | 3 |
|
||||
| b | 1 | ab | 4 |
|
||||
| b | a | ab | 4 |
|
||||
| 1 | 0 | ab | 4 |
|
||||
| 1 | a | ab | 4 |
|
||||
| from | to | route | modes |
|
||||
| a | 0 | ab | river downstream |
|
||||
| a | b | ab | river downstream |
|
||||
| 0 | 1 | ab | river downstream |
|
||||
| 0 | b | ab | river downstream |
|
||||
| b | 1 | ab | river upstream |
|
||||
| b | a | ab | river upstream |
|
||||
| 1 | 0 | ab | river upstream |
|
||||
| 1 | a | ab | river upstream |
|
||||
|
||||
Scenario: Testbot - Modes in each direction, same forward/backward speeds
|
||||
Given the node map
|
||||
@ -72,11 +75,11 @@ Feature: Testbot - Travel mode
|
||||
| ab | steps |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes | time |
|
||||
| 0 | 1 | ab | 5 | 60s +-1 |
|
||||
| 1 | 0 | ab | 6 | 60s +-1 |
|
||||
| from | to | route | modes | time |
|
||||
| 0 | 1 | ab | steps down | 60s +-1 |
|
||||
| 1 | 0 | ab | steps up | 60s +-1 |
|
||||
|
||||
@oneway
|
||||
@oneway @mokob @2166
|
||||
Scenario: Testbot - Modes for oneway, different forward/backward speeds
|
||||
Given the node map
|
||||
| a | b |
|
||||
@ -86,9 +89,9 @@ Feature: Testbot - Travel mode
|
||||
| ab | river | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | b | ab | 3 |
|
||||
| b | a | | |
|
||||
| from | to | route | modes |
|
||||
| a | b | ab | river downstream |
|
||||
| b | a | | |
|
||||
|
||||
@oneway
|
||||
Scenario: Testbot - Modes for oneway, same forward/backward speeds
|
||||
@ -100,11 +103,11 @@ Feature: Testbot - Travel mode
|
||||
| ab | steps | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | b | ab | 5 |
|
||||
| b | a | | |
|
||||
| from | to | route | modes |
|
||||
| a | b | ab | steps down |
|
||||
| b | a | | |
|
||||
|
||||
@oneway
|
||||
@oneway @mokob @2166
|
||||
Scenario: Testbot - Modes for reverse oneway, different forward/backward speeds
|
||||
Given the node map
|
||||
| a | b |
|
||||
@ -114,9 +117,9 @@ Feature: Testbot - Travel mode
|
||||
| ab | river | -1 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | b | | |
|
||||
| b | a | ab | 4 |
|
||||
| from | to | route | modes |
|
||||
| a | b | | |
|
||||
| b | a | ab | river upstream |
|
||||
|
||||
@oneway
|
||||
Scenario: Testbot - Modes for reverse oneway, same forward/backward speeds
|
||||
@ -128,11 +131,11 @@ Feature: Testbot - Travel mode
|
||||
| ab | steps | -1 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | b | | |
|
||||
| b | a | ab | 6 |
|
||||
| from | to | route | modes |
|
||||
| a | b | | |
|
||||
| b | a | ab | steps up |
|
||||
|
||||
@via
|
||||
@via @mokob @2166
|
||||
Scenario: Testbot - Mode should be set at via points
|
||||
Given the node map
|
||||
| a | 1 | b |
|
||||
@ -142,10 +145,11 @@ Feature: Testbot - Travel mode
|
||||
| ab | river |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | modes | turns |
|
||||
| a,1,b | ab,ab | 3,3 | head,via,destination |
|
||||
| b,1,a | ab,ab | 4,4 | head,via,destination |
|
||||
| waypoints | route | modes | turns |
|
||||
| a,1,b | ab,ab | river downstream,river downstream | head,via,destination |
|
||||
| b,1,a | ab,ab | river upstream,river upstream | head,via,destination |
|
||||
|
||||
@mokob @2166
|
||||
Scenario: Testbot - Starting at a tricky node
|
||||
Given the node map
|
||||
| | a | | | |
|
||||
@ -157,9 +161,10 @@ Feature: Testbot - Travel mode
|
||||
| bc | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| b | a | ab | 4 |
|
||||
| from | to | route | modes |
|
||||
| b | a | ab | river upstream |
|
||||
|
||||
@mokob @2166
|
||||
Scenario: Testbot - Mode changes on straight way without name change
|
||||
Given the node map
|
||||
| a | 1 | b | 2 | c |
|
||||
@ -170,11 +175,11 @@ Feature: Testbot - Travel mode
|
||||
| bc | river | Avenue |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes | turns |
|
||||
| a | c | Avenue,Avenue | 1,3 | head,straight,destination |
|
||||
| c | a | Avenue,Avenue | 4,1 | head,straight,destination |
|
||||
| 1 | 2 | Avenue,Avenue | 1,3 | head,straight,destination |
|
||||
| 2 | 1 | Avenue,Avenue | 4,1 | head,straight,destination |
|
||||
| from | to | route | modes | turns |
|
||||
| a | c | Avenue,Avenue | driving,river downstream | head,straight,destination |
|
||||
| c | a | Avenue,Avenue | river upstream,driving | head,straight,destination |
|
||||
| 1 | 2 | Avenue,Avenue | driving,river downstream | head,straight,destination |
|
||||
| 2 | 1 | Avenue,Avenue | river upstream,driving | head,straight,destination |
|
||||
|
||||
Scenario: Testbot - Mode for routes
|
||||
Given the node map
|
||||
@ -190,15 +195,16 @@ Feature: Testbot - Travel mode
|
||||
| ef | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | 1,2,1 |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | 1,2,1 |
|
||||
| c | a | bc,ab | head,left,destination | 2,1 |
|
||||
| d | b | cd,bc | head,right,destination | 1,2 |
|
||||
| a | c | ab,bc | head,right,destination | 1,2 |
|
||||
| b | d | bc,cd | head,left,destination | 2,1 |
|
||||
| a | f | ab,bc,cd,de,ef | head,right,left,straight,straight,destination | 1,2,1,1,1 |
|
||||
| from | to | route | turns | modes |
|
||||
| a | d | ab,bc,cd | head,right,left,destination | driving,route,driving |
|
||||
| d | a | cd,bc,ab | head,right,left,destination | driving,route,driving |
|
||||
| c | a | bc,ab | head,left,destination | route,driving |
|
||||
| d | b | cd,bc | head,right,destination | driving,route |
|
||||
| a | c | ab,bc | head,right,destination | driving,route |
|
||||
| b | d | bc,cd | head,left,destination | route,driving |
|
||||
| a | f | ab,bc,cd,de,ef | head,right,left,straight,straight,destination | driving,route,driving,driving,driving |
|
||||
|
||||
@mokob @2166
|
||||
Scenario: Testbot - Modes, triangle map
|
||||
Given the node map
|
||||
| | | | | | | d |
|
||||
@ -218,21 +224,22 @@ Feature: Testbot - Travel mode
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| 0 | 1 | abc,ce,de | 1,3,1 |
|
||||
| 1 | 0 | de,ce,abc | 1,4,1 |
|
||||
| 0 | 2 | abc,cd | 1,1 |
|
||||
| 2 | 0 | cd,de,ce,abc | 1,1,4,1 |
|
||||
| 0 | 3 | abc,ce | 1,3 |
|
||||
| 3 | 0 | ce,abc | 4,1 |
|
||||
| 4 | 3 | ce | 3 |
|
||||
| 3 | 4 | ce | 4 |
|
||||
| 3 | 1 | ce,de | 3,1 |
|
||||
| 1 | 3 | de,ce | 1,4 |
|
||||
| a | e | abc,ce | 1,3 |
|
||||
| e | a | ce,abc | 4,1 |
|
||||
| a | d | abc,cd | 1,1 |
|
||||
| d | a | de,ce,abc | 1,4,1 |
|
||||
| 0 | 1 | abc,ce,de | driving,river downstream,driving |
|
||||
| 1 | 0 | de,ce,abc | driving,river upstream,driving |
|
||||
| 0 | 2 | abc,cd | driving,driving |
|
||||
| 2 | 0 | cd,de,ce,abc | driving,driving,river upstream,driving |
|
||||
| 0 | 3 | abc,ce | driving,river downstream |
|
||||
| 3 | 0 | ce,abc | river upstream,driving |
|
||||
| 4 | 3 | ce | river downstream |
|
||||
| 3 | 4 | ce | river upstream |
|
||||
| 3 | 1 | ce,de | river downstream,driving |
|
||||
| 1 | 3 | de,ce | driving,river upstream |
|
||||
| a | e | abc,ce | driving,river downstream |
|
||||
| e | a | ce,abc | river upstream,driving |
|
||||
| a | d | abc,cd | driving,driving |
|
||||
| d | a | de,ce,abc | driving,river upstream,driving |
|
||||
|
||||
@mokob @2166
|
||||
Scenario: Testbot - River in the middle
|
||||
Given the node map
|
||||
| a | b | c | | |
|
||||
@ -246,12 +253,12 @@ Feature: Testbot - Travel mode
|
||||
| efg | primary |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg | 1,3,1 |
|
||||
| b | f | abc,cde,efg | 1,3,1 |
|
||||
| e | c | cde | 4 |
|
||||
| e | b | cde,abc | 4,1 |
|
||||
| e | a | cde,abc | 4,1 |
|
||||
| c | e | cde | 3 |
|
||||
| c | f | cde,efg | 3,1 |
|
||||
| c | g | cde,efg | 3,1 |
|
||||
| from | to | route | modes |
|
||||
| a | g | abc,cde,efg | driving,river downstream,driving |
|
||||
| b | f | abc,cde,efg | driving,river downstream,driving |
|
||||
| e | c | cde | river upstream |
|
||||
| e | b | cde,abc | river upstream,driving |
|
||||
| e | a | cde,abc | river upstream,driving |
|
||||
| c | e | cde | river downstream |
|
||||
| c | f | cde,efg | river downstream,driving |
|
||||
| c | g | cde,efg | river downstream,driving |
|
||||
|
Loading…
Reference in New Issue
Block a user