2012-11-04 08:00:21 -05:00
|
|
|
@routing @testbot @ferry
|
|
|
|
Feature: Testbot - Handle ferry routes
|
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
Background:
|
|
|
|
Given the profile "testbot"
|
|
|
|
|
|
|
|
Scenario: Testbot - Ferry duration, single node
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c d
|
|
|
|
e f g h
|
|
|
|
i j k l
|
|
|
|
m n o p
|
|
|
|
q r s t
|
|
|
|
"""
|
2013-08-29 13:29:13 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | route | duration |
|
|
|
|
| ab | primary | | |
|
|
|
|
| cd | primary | | |
|
|
|
|
| ef | primary | | |
|
|
|
|
| gh | primary | | |
|
|
|
|
| ij | primary | | |
|
|
|
|
| kl | primary | | |
|
|
|
|
| mn | primary | | |
|
|
|
|
| op | primary | | |
|
|
|
|
| qr | primary | | |
|
|
|
|
| st | primary | | |
|
|
|
|
| bc | | ferry | 0:01 |
|
|
|
|
| fg | | ferry | 0:10 |
|
|
|
|
| jk | | ferry | 1:00 |
|
|
|
|
| no | | ferry | 24:00 |
|
|
|
|
| rs | | ferry | 96:00 |
|
2013-01-01 12:41:38 -05:00
|
|
|
|
|
|
|
When I route I should get
|
2013-08-29 13:29:13 -04:00
|
|
|
| from | to | route | time |
|
2016-03-31 20:30:47 -04:00
|
|
|
| b | c | bc,bc | 60s +-1 |
|
|
|
|
| f | g | fg,fg | 600s +-1 |
|
|
|
|
| j | k | jk,jk | 3600s +-1 |
|
|
|
|
| n | o | no,no | 86400s +-1 |
|
|
|
|
| r | s | rs,rs | 345600s +-1 |
|
2013-08-29 13:29:13 -04:00
|
|
|
|
2013-01-01 12:41:38 -05:00
|
|
|
@todo
|
2013-08-29 13:29:13 -04:00
|
|
|
Scenario: Testbot - Week long ferry routes
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c d
|
|
|
|
e f g h
|
|
|
|
i j k l
|
|
|
|
"""
|
2013-08-29 13:29:13 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | route | duration |
|
|
|
|
| ab | primary | | |
|
|
|
|
| cd | primary | | |
|
|
|
|
| ef | primary | | |
|
|
|
|
| gh | primary | | |
|
|
|
|
| ij | primary | | |
|
|
|
|
| kl | primary | | |
|
|
|
|
| bc | | ferry | 24:00 |
|
|
|
|
| fg | | ferry | 168:00 |
|
|
|
|
| jk | | ferry | 720:00 |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| from | to | route | time |
|
2016-03-31 20:30:47 -04:00
|
|
|
| b | c | bc,bc | 86400s +-1 |
|
|
|
|
| f | g | fg,fg | 604800s +-1 |
|
|
|
|
| j | k | jk,jk | 259200s +-1 |
|
2013-08-29 13:29:13 -04:00
|
|
|
|
|
|
|
Scenario: Testbot - Ferry duration, multiple nodes
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
x y
|
|
|
|
a b c d
|
|
|
|
"""
|
2013-08-29 13:29:13 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | route | duration |
|
|
|
|
| xa | primary | | |
|
|
|
|
| yd | primary | | |
|
|
|
|
| ad | | ferry | 1:00 |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| from | to | route | time |
|
2016-03-31 20:30:47 -04:00
|
|
|
| a | d | ad,ad | 3600s +-1 |
|
|
|
|
| d | a | ad,ad | 3600s +-1 |
|
2013-08-29 13:29:13 -04:00
|
|
|
|
2012-12-10 07:08:26 -05:00
|
|
|
@todo
|
2013-08-29 13:29:13 -04:00
|
|
|
Scenario: Testbot - Ferry duration, individual parts, fast
|
2013-01-01 12:41:38 -05:00
|
|
|
Given a grid size of 10000 meters
|
2013-08-29 13:29:13 -04:00
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
x y z v
|
|
|
|
a b c d
|
|
|
|
"""
|
2013-08-29 13:29:13 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | route | duration |
|
|
|
|
| xa | primary | | |
|
|
|
|
| yb | primary | | |
|
|
|
|
| zc | primary | | |
|
|
|
|
| vd | primary | | |
|
|
|
|
| abcd | | ferry | 0:06 |
|
|
|
|
|
|
|
|
When I route I should get
|
2016-03-31 20:30:47 -04:00
|
|
|
| from | to | route | time |
|
|
|
|
| a | d | abcd,abcd | 360s +-1 |
|
|
|
|
| a | b | abcd,abcd | 60s +-1 |
|
|
|
|
| b | c | abcd,abcd | 120s +-1 |
|
|
|
|
| c | d | abcd,abcd | 180s +-1 |
|
2013-08-29 13:29:13 -04:00
|
|
|
|
2013-01-01 12:41:38 -05:00
|
|
|
@todo
|
2013-08-29 13:29:13 -04:00
|
|
|
Scenario: Testbot - Ferry duration, individual parts, slow
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
x y z v
|
|
|
|
a b c d
|
|
|
|
"""
|
2013-08-29 13:29:13 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | route | duration |
|
|
|
|
| xa | primary | | |
|
|
|
|
| yb | primary | | |
|
|
|
|
| zc | primary | | |
|
|
|
|
| vd | primary | | |
|
|
|
|
| abcd | | ferry | 1:00 |
|
|
|
|
|
|
|
|
When I route I should get
|
2016-03-31 20:30:47 -04:00
|
|
|
| from | to | route | time |
|
|
|
|
| a | d | abcd,abcd | 3600s ~1% |
|
|
|
|
| a | b | abcd,abcd | 600s ~1% |
|
|
|
|
| b | c | abcd,abcd | 1200s ~1% |
|
|
|
|
| c | d | abcd,abcd | 1800s ~1% |
|
2013-08-29 13:29:13 -04:00
|
|
|
|
|
|
|
Scenario: Testbot - Ferry duration, connected routes
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
x d y
|
|
|
|
a b c e f g t
|
|
|
|
"""
|
2013-08-29 13:29:13 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | route | duration |
|
|
|
|
| xa | primary | | |
|
|
|
|
| yg | primary | | |
|
|
|
|
| abcd | | ferry | 0:30 |
|
|
|
|
| defg | | ferry | 0:30 |
|
|
|
|
|
|
|
|
When I route I should get
|
2016-03-31 20:30:47 -04:00
|
|
|
| from | to | route | time |
|
|
|
|
| a | g | abcd,defg,defg | 3600s +-1 |
|
|
|
|
| g | a | defg,abcd,abcd | 3600s +-1 |
|
2013-08-29 13:29:13 -04:00
|
|
|
|
|
|
|
Scenario: Testbot - Prefer road when faster than ferry
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
x a b c
|
|
|
|
d
|
|
|
|
y g f e
|
|
|
|
"""
|
2013-08-29 13:29:13 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | route | duration |
|
|
|
|
| xa | primary | | |
|
|
|
|
| yg | primary | | |
|
|
|
|
| xy | primary | | |
|
2017-01-17 11:17:47 -05:00
|
|
|
| abcd | | ferry | 0:02 |
|
|
|
|
| defg | | ferry | 0:02 |
|
2013-08-29 13:29:13 -04:00
|
|
|
|
|
|
|
When I route I should get
|
2017-02-15 09:12:24 -05:00
|
|
|
| from | to | route | time |
|
|
|
|
| a | g | xa,xy,yg | 60s +-25% |
|
|
|
|
| g | a | yg,xy,xa | 60s +-25% |
|
2013-08-29 13:29:13 -04:00
|
|
|
|
|
|
|
Scenario: Testbot - Long winding ferry route
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
x b d f y
|
|
|
|
a c e g
|
|
|
|
"""
|
2013-08-29 13:29:13 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | route | duration |
|
|
|
|
| xa | primary | | |
|
|
|
|
| yg | primary | | |
|
|
|
|
| abcdefg | | ferry | 6:30 |
|
|
|
|
|
|
|
|
When I route I should get
|
2016-03-31 20:30:47 -04:00
|
|
|
| from | to | route | time |
|
2017-01-17 11:17:47 -05:00
|
|
|
| a | g | abcdefg,abcdefg | 23400s +-3 |
|
|
|
|
| g | a | abcdefg,abcdefg | 23400s +-3 |
|
2015-05-10 14:04:14 -04:00
|
|
|
|
|
|
|
@todo
|
|
|
|
Scenario: Testbot - Ferry duration formats
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a c e g i k m o q s
|
|
|
|
b d f h j l n p r t
|
|
|
|
"""
|
2015-05-10 14:04:14 -04:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | route | duration |
|
|
|
|
| ab | ferry | 0:01 |
|
|
|
|
| cd | ferry | 00:01 |
|
|
|
|
| ef | ferry | 1:00 |
|
|
|
|
| gh | ferry | 01:00 |
|
|
|
|
| ij | ferry | 02:20 |
|
|
|
|
| kl | ferry | 10:00 |
|
|
|
|
| mn | ferry | 100:00 |
|
|
|
|
| op | ferry | 1000:00 |
|
|
|
|
| qr | ferry | 10000:00 |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| from | to | route | time |
|
2016-03-31 20:30:47 -04:00
|
|
|
| a | b | ab,ab | 60s +-1 |
|
|
|
|
| c | d | cd,cd | 60s +-1 |
|
|
|
|
| e | f | ef,ef | 3600s +-1 |
|
|
|
|
| g | h | gh,gh | 3600s +-1 |
|
|
|
|
| i | j | ij,ij | 8400s +-1 |
|
|
|
|
| k | l | kl,kl | 36000s +-1 |
|
|
|
|
| m | n | mn,mn | 360000s +-1 |
|
|
|
|
| o | p | mn,mn | 3600000s +-1 |
|
|
|
|
| q | r | mn,mn | 36000000s +-1 |
|