Cucumner tests for data_version in matching
This commit is contained in:
parent
35cd3a2c26
commit
81fb2cc9da
@ -117,6 +117,10 @@ module.exports = function () {
|
||||
got.duration = duration.toString();
|
||||
}
|
||||
|
||||
if (headers.has('data_version')) {
|
||||
got.data_version = json.data_version || '';
|
||||
}
|
||||
|
||||
// if header matches 'a:*', parse out the values for *
|
||||
// and return in that header
|
||||
headers.forEach((k) => {
|
||||
|
||||
@ -722,4 +722,4 @@ Feature: Basic Distance Matrix
|
||||
When I request a travel distance matrix I should get
|
||||
| | 1 | 2 |
|
||||
| 1 | 0 | 1000.7 |
|
||||
| 2 | 1000.7 | 0 |
|
||||
| 2 | 1000.7 | 0 |
|
||||
|
||||
@ -21,8 +21,27 @@ Feature: Basic Map Matching
|
||||
| abcd | no |
|
||||
|
||||
When I match I should get
|
||||
| trace | timestamps | matchings |
|
||||
| ab1d | 0 1 2 3 | ad |
|
||||
| trace | timestamps | matchings | data_version |
|
||||
| ab1d | 0 1 2 3 | ad | |
|
||||
|
||||
Scenario: Data_version test on matching
|
||||
Given a grid size of 100 meters
|
||||
Given the node map
|
||||
"""
|
||||
a b c d
|
||||
|
||||
1
|
||||
"""
|
||||
|
||||
And the extract extra arguments "--data_version cucumber_data_version"
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| abcd | no |
|
||||
|
||||
When I match I should get
|
||||
| trace | timestamps | matchings | data_version |
|
||||
| ab1d | 0 1 2 3 | ad | cucumber_data_version |
|
||||
|
||||
Scenario: Testbot - Map matching with trace splitting
|
||||
Given the node map
|
||||
@ -792,4 +811,4 @@ Feature: Basic Map Matching
|
||||
When I match I should get
|
||||
| trace | geometry | a:distance | a:duration | a:weight | duration |
|
||||
| 2345 | 1.00018,1,1.000315,1 | 15.013264 | 1.5 | 1.5 | 1.5 |
|
||||
| 4321 | 1.00027,1,1.000135,1 | 15.013264 | 1.5 | 1.5 | 1.5 |
|
||||
| 4321 | 1.00027,1,1.000135,1 | 15.013264 | 1.5 | 1.5 | 1.5 |
|
||||
|
||||
@ -47,11 +47,31 @@ Feature: Snap start/end point to the nearest way
|
||||
| adb |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| 1 | b | adb,adb |
|
||||
| 2 | b | adb,adb |
|
||||
| 6 | b | aub,aub |
|
||||
| 7 | b | aub,aub |
|
||||
| from | to | route | data_version |
|
||||
| 1 | b | adb,adb | |
|
||||
| 2 | b | adb,adb | |
|
||||
| 6 | b | aub,aub | |
|
||||
| 7 | b | aub,aub | |
|
||||
|
||||
Scenario: Data_version check on nearest
|
||||
Given the node map
|
||||
"""
|
||||
4 5 6 7
|
||||
3 a u
|
||||
2
|
||||
1 d b
|
||||
"""
|
||||
|
||||
And the extract extra arguments "--data_version cucumber_data_version"
|
||||
|
||||
And the ways
|
||||
| nodes |
|
||||
| aub |
|
||||
| adb |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | data_version |
|
||||
| 1 | b | adb,adb | cucumber_data_version |
|
||||
|
||||
Scenario: Snap to edge right under start/end point
|
||||
Given the node map
|
||||
@ -182,4 +202,4 @@ Feature: Snap start/end point to the nearest way
|
||||
| x | m | xe,xe |
|
||||
| x | n | xf,xf |
|
||||
| x | o | xg,xg |
|
||||
| x | p | xh,xh |
|
||||
| x | p | xh,xh |
|
||||
|
||||
@ -370,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 |
|
||||
|
||||
Loading…
Reference in New Issue
Block a user