|
|
@ -90,22 +90,24 @@ module.exports.tests.query = function(test, common) { |
|
|
|
t.end(); |
|
|
|
t.end(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
test('search with viewport diagonal < 1km should set scale to 1km', function(t) { |
|
|
|
// viewport scale sizing currently diabled.
|
|
|
|
var query = generate({ |
|
|
|
// ref: https://github.com/pelias/api/pull/388
|
|
|
|
text: 'test', querySize: 10, |
|
|
|
// test('search with viewport diagonal < 1km should set scale to 1km', function(t) {
|
|
|
|
'focus.viewport.min_lat': 28.49135, |
|
|
|
// var query = generate({
|
|
|
|
'focus.viewport.max_lat': 28.49137, |
|
|
|
// text: 'test', querySize: 10,
|
|
|
|
'focus.viewport.min_lon': -87.50622, |
|
|
|
// 'focus.viewport.min_lat': 28.49135,
|
|
|
|
'focus.viewport.max_lon': -87.50624, |
|
|
|
// 'focus.viewport.max_lat': 28.49137,
|
|
|
|
layers: ['test'] |
|
|
|
// 'focus.viewport.min_lon': -87.50622,
|
|
|
|
}); |
|
|
|
// 'focus.viewport.max_lon': -87.50624,
|
|
|
|
|
|
|
|
// layers: ['test']
|
|
|
|
var compiled = JSON.parse( JSON.stringify( query ) ); |
|
|
|
// });
|
|
|
|
var expected = require('../fixture/search_linguistic_viewport_min_diagonal'); |
|
|
|
//
|
|
|
|
|
|
|
|
// var compiled = JSON.parse( JSON.stringify( query ) );
|
|
|
|
t.deepEqual(compiled, expected, 'valid search query'); |
|
|
|
// var expected = require('../fixture/search_linguistic_viewport_min_diagonal');
|
|
|
|
t.end(); |
|
|
|
//
|
|
|
|
}); |
|
|
|
// t.deepEqual(compiled, expected, 'valid search query');
|
|
|
|
|
|
|
|
// t.end();
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
test('search search + focus on null island', function(t) { |
|
|
|
test('search search + focus on null island', function(t) { |
|
|
|
var query = generate({ |
|
|
|
var query = generate({ |
|
|
|