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();
|
got.duration = duration.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (headers.has('data_version')) {
|
||||||
|
got.data_version = json.data_version || '';
|
||||||
|
}
|
||||||
|
|
||||||
// if header matches 'a:*', parse out the values for *
|
// if header matches 'a:*', parse out the values for *
|
||||||
// and return in that header
|
// and return in that header
|
||||||
headers.forEach((k) => {
|
headers.forEach((k) => {
|
||||||
|
|||||||
@ -21,8 +21,27 @@ Feature: Basic Map Matching
|
|||||||
| abcd | no |
|
| abcd | no |
|
||||||
|
|
||||||
When I match I should get
|
When I match I should get
|
||||||
| trace | timestamps | matchings |
|
| trace | timestamps | matchings | data_version |
|
||||||
| ab1d | 0 1 2 3 | ad |
|
| 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
|
Scenario: Testbot - Map matching with trace splitting
|
||||||
Given the node map
|
Given the node map
|
||||||
|
|||||||
@ -47,11 +47,31 @@ Feature: Snap start/end point to the nearest way
|
|||||||
| adb |
|
| adb |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route |
|
| from | to | route | data_version |
|
||||||
| 1 | b | adb,adb |
|
| 1 | b | adb,adb | |
|
||||||
| 2 | b | adb,adb |
|
| 2 | b | adb,adb | |
|
||||||
| 6 | b | aub,aub |
|
| 6 | b | aub,aub | |
|
||||||
| 7 | 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
|
Scenario: Snap to edge right under start/end point
|
||||||
Given the node map
|
Given the node map
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user