Skip to content

Commit 7606b0b

Browse files
wip
1 parent b54672d commit 7606b0b

File tree

7 files changed

+68
-840
lines changed

7 files changed

+68
-840
lines changed

features/step_definitions/matching.js

+6
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ module.exports = function () {
2222
got.code = json.code;
2323
}
2424

25+
console.log(res.body)
26+
2527

2628
if (headers.has('status')) {
2729
got.status = json.status.toString();
@@ -214,6 +216,8 @@ module.exports = function () {
214216
}
215217
}
216218

219+
console.log(`OK ${ok}`)
220+
217221
if (ok) {
218222
if (headers.has('matchings')) {
219223
got.matchings = row.matchings;
@@ -234,10 +238,12 @@ module.exports = function () {
234238

235239
cb(null, got);
236240
};
241+
console.log('REQ = ', row.request)
237242

238243
if (row.request) {
239244
got = {};
240245
got.request = row.request;
246+
console.log('REQ = ', row.request)
241247
this.requestUrl(row.request, afterRequest);
242248
} else {
243249
var params = this.queryParams;

features/support/http.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = function () {
2828
var runRequest = (cb) => {
2929
var params = this.paramsToString(parameters);
3030
this.query = baseUri + (params.length ? '/' + params : '');
31-
31+
console.log(`query = ${this.query}`);
3232
request(this.query, (err, res, body) => {
3333
if (err && err.code === 'ECONNREFUSED') {
3434
return cb(new Error('*** osrm-routed is not running.'));

features/support/route.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ module.exports = function () {
1212
} else {
1313
uri = [this.HOST, service, 'v1', this.profile].join('/');
1414
}
15-
1615
return this.sendRequest(uri, params, callback);
1716
};
1817

@@ -122,6 +121,8 @@ module.exports = function () {
122121
params.timestamps = timestamps.join(';');
123122
}
124123

124+
console.log(`match ${JSON.stringify(params)}`)
125+
125126
return this.requestPath('match', params, callback);
126127
};
127128

features/support/shared_steps.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@ module.exports = function () {
4141
let json = JSON.parse(body);
4242

4343
got.code = json.code;
44-
44+
console.log(`body ${body}`)
4545
let hasRoute = json.code === 'Ok';
46-
4746
if (hasRoute) {
4847
instructions = this.wayList(json.routes[0]);
4948
pronunciations = this.pronunciationList(json.routes[0]);
@@ -88,8 +87,11 @@ module.exports = function () {
8887
got.geometry = json.routes[0].geometry;
8988
}
9089

90+
console.log(`hasRoute: ${hasRoute}`);
9191
if (headers.has('route')) {
92+
console.log(`hasRoute2: ${hasRoute}`);
9293
got.route = (instructions || '').trim();
94+
console.log(`hasRoute2: ${got.route}`);
9395
}
9496

9597
if (headers.has('summary')) {

0 commit comments

Comments
 (0)