Trip with Fixed Start and End points (TFSE) (#3408)
* fixed start and end trip feature to trip service
This commit is contained in:
+200
-17
@@ -5,7 +5,25 @@ Feature: Basic trip planning
|
||||
Given the profile "testbot"
|
||||
Given a grid size of 10 meters
|
||||
|
||||
Scenario: Testbot - Trip planning with less than 10 nodes
|
||||
Scenario: Testbot - Trip: Roundtrip with one waypoint
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
c d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| bc |
|
||||
| cb |
|
||||
| da |
|
||||
|
||||
When I plan a trip I should get
|
||||
| waypoints | trips |
|
||||
| a | aa |
|
||||
|
||||
Scenario: Testbot - Trip: Roundtrip with waypoints (less than 10)
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
@@ -24,7 +42,7 @@ Feature: Basic trip planning
|
||||
| a,b,c,d | abcda | 7.6 |
|
||||
| d,b,c,a | dbcad | 7.6 |
|
||||
|
||||
Scenario: Testbot - Trip planning with more than 10 nodes
|
||||
Scenario: Testbot - Trip: Roundtrip waypoints (more than 10)
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
@@ -37,7 +55,6 @@ Feature: Basic trip planning
|
||||
| nodes |
|
||||
| ab |
|
||||
| bc |
|
||||
| cb |
|
||||
| de |
|
||||
| ef |
|
||||
| fg |
|
||||
@@ -48,12 +65,85 @@ Feature: Basic trip planning
|
||||
| kl |
|
||||
| la |
|
||||
|
||||
When I plan a trip I should get
|
||||
| waypoints | trips |
|
||||
| a,b,c,d,e,f,g,h,i,j,k,l | alkjihgfedcba |
|
||||
|
||||
Scenario: Testbot - Trip: Roundtrip FS waypoints (more than 10)
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
l e
|
||||
k f
|
||||
j i h g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| bc |
|
||||
| de |
|
||||
| ef |
|
||||
| fg |
|
||||
| gh |
|
||||
| hi |
|
||||
| ij |
|
||||
| jk |
|
||||
| kl |
|
||||
| la |
|
||||
|
||||
When I plan a trip I should get
|
||||
| waypoints | source | trips |
|
||||
| a,b,c,d,e,f,g,h,i,j,k,l | first | alkjihgfedcba |
|
||||
|
||||
Scenario: Testbot - Trip: Roundtrip FE waypoints (more than 10)
|
||||
Given the query options
|
||||
| source | last |
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
l e
|
||||
k f
|
||||
j i h g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| bc |
|
||||
| de |
|
||||
| ef |
|
||||
| fg |
|
||||
| gh |
|
||||
| hi |
|
||||
| ij |
|
||||
| jk |
|
||||
| kl |
|
||||
| la |
|
||||
|
||||
When I plan a trip I should get
|
||||
| waypoints | trips |
|
||||
| a,b,c,d,e,f,g,h,i,j,k,l | cbalkjihgfedc |
|
||||
| a,b,c,d,e,f,g,h,i,j,k,l | lkjihgfedcbal |
|
||||
|
||||
Scenario: Testbot - Trip planning with multiple scc
|
||||
Scenario: Testbot - Trip: Unroutable roundtrip with waypoints (less than 10)
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
|
||||
d c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| dc |
|
||||
|
||||
When I plan a trip I should get
|
||||
| waypoints | status | message |
|
||||
| a,b,c,d | NoTrips | No trip visiting all destinations possible. |
|
||||
|
||||
|
||||
Scenario: Testbot - Trip: Unroutable roundtrip with waypoints (more than 10)
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
@@ -62,7 +152,7 @@ Feature: Basic trip planning
|
||||
j i h g
|
||||
|
||||
q m n
|
||||
p o
|
||||
p o
|
||||
"""
|
||||
|
||||
And the ways
|
||||
@@ -85,13 +175,106 @@ Feature: Basic trip planning
|
||||
| pq |
|
||||
| qm |
|
||||
|
||||
When I plan a trip I should get
|
||||
| waypoints | status | message |
|
||||
| a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p | NoTrips | No trip visiting all destinations possible. |
|
||||
|
||||
# Test TFSE
|
||||
Scenario: Testbot - Trip: TFSE with errors
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
|
||||
d c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| dc |
|
||||
|
||||
When I plan a trip I should get
|
||||
| waypoints | source | destination | roundtrip | status | message |
|
||||
| a,b,c,d | first | last | false | NoTrips | No trip visiting all destinations possible. |
|
||||
|
||||
Scenario: Testbot - Trip: FSE with waypoints (less than 10)
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
|
||||
c
|
||||
e d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| ac |
|
||||
| ad |
|
||||
| ae |
|
||||
| bc |
|
||||
| bd |
|
||||
| be |
|
||||
| cd |
|
||||
| ce |
|
||||
| de |
|
||||
|
||||
When I plan a trip I should get
|
||||
| waypoints | trips |
|
||||
| a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p | defghijklabcd,mnopm |
|
||||
| waypoints | source | destination |roundtrip | trips | durations | distance |
|
||||
| a,b,d,e,c | first | last | false | abedc | 8.200000000000001 | 81.6 |
|
||||
|
||||
# Test single node in each component #1850
|
||||
Scenario: Testbot - Trip planning with less than 10 nodes
|
||||
|
||||
Scenario: Testbot - Trip: FSE with waypoints (more than 10)
|
||||
Given the node map
|
||||
"""
|
||||
a b c d e f g h i j k
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| bc |
|
||||
| cd |
|
||||
| de |
|
||||
| ef |
|
||||
| fg |
|
||||
| gh |
|
||||
| hi |
|
||||
| ij |
|
||||
| jk |
|
||||
|
||||
When I plan a trip I should get
|
||||
| waypoints | source | destination | roundtrip | trips | durations | distance |
|
||||
| a,b,c,d,e,h,i,j,k,g,f | first | last | false | abcdeghijkf | 15 | 149.8 |
|
||||
|
||||
Scenario: Testbot - Trip: FSE roundtrip with waypoints (less than 10)
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
|
||||
c
|
||||
e d
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| ab |
|
||||
| ac |
|
||||
| ad |
|
||||
| ae |
|
||||
| bc |
|
||||
| bd |
|
||||
| be |
|
||||
| cd |
|
||||
| ce |
|
||||
| de |
|
||||
|
||||
When I plan a trip I should get
|
||||
| waypoints | source | destination | roundtrip | trips |
|
||||
| a,b,d,e,c | first | last | true | abedca |
|
||||
|
||||
|
||||
Scenario: Testbot - Trip: midway points in isoldated roads should return no trips
|
||||
Given the node map
|
||||
"""
|
||||
a 1 b
|
||||
@@ -105,10 +288,10 @@ Feature: Basic trip planning
|
||||
| cd |
|
||||
|
||||
When I plan a trip I should get
|
||||
| waypoints | trips |
|
||||
| 1,2 | |
|
||||
| waypoints | status | message |
|
||||
| 1,2 | NoTrips | No trip visiting all destinations possible. |
|
||||
|
||||
Scenario: Testbot - Repeated Coordinate
|
||||
Scenario: Testbot - Trip: Repeated Coordinate
|
||||
Given the node map
|
||||
"""
|
||||
a b
|
||||
@@ -123,7 +306,7 @@ Feature: Basic trip planning
|
||||
| a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a | |
|
||||
|
||||
|
||||
Scenario: Testbot - Trip with geometry details of geojson
|
||||
Scenario: Testbot - Trip: geometry details of geojson
|
||||
Given the query options
|
||||
| geometries | geojson |
|
||||
|
||||
@@ -145,7 +328,7 @@ Feature: Basic trip planning
|
||||
| a,b,c,d | abcda | 7.6 | 1,1,1.00009,1,1,0.99991,1.00009,1,1,1,1.00009,0.99991,1,1 |
|
||||
| d,b,c,a | dbcad | 7.6 | 1.00009,0.99991,1,1,1.00009,1,1,0.99991,1.00009,1,1,1,1.00009,0.99991 |
|
||||
|
||||
Scenario: Testbot - Trip with geometry details of polyline
|
||||
Scenario: Testbot - Trip: geometry details of polyline
|
||||
Given the query options
|
||||
| geometries | polyline |
|
||||
|
||||
@@ -167,7 +350,7 @@ Feature: Basic trip planning
|
||||
| a,b,c,d | abcda | 7.6 | 1,1,1,1.00009,0.99991,1,1,1.00009,1,1,0.99991,1.00009,1,1 |
|
||||
| d,b,c,a | dbcad | 7.6 | 0.99991,1.00009,1,1,1,1.00009,0.99991,1,1,1.00009,1,1,0.99991,1.00009 |
|
||||
|
||||
Scenario: Testbot - Trip with geometry details of polyline6
|
||||
Scenario: Testbot - Trip: geometry details of polyline6
|
||||
Given the query options
|
||||
| geometries | polyline6 |
|
||||
|
||||
@@ -187,4 +370,4 @@ Feature: Basic trip planning
|
||||
When I plan a trip I should get
|
||||
| waypoints | trips | durations | geometry |
|
||||
| a,b,c,d | abcda | 7.6 | 1,1,1,1.00009,0.99991,1,1,1.00009,1,1,0.99991,1.00009,1,1 |
|
||||
| d,b,c,a | dbcad | 7.6 | 0.99991,1.00009,1,1,1,1.00009,0.99991,1,1,1.00009,1,1,0.99991,1.00009 |
|
||||
| d,b,c,a | dbcad | 7.6 | 0.99991,1.00009,1,1,1,1.00009,0.99991,1,1,1.00009,1,1,0.99991,1.00009 |
|
||||
Reference in New Issue
Block a user