[test,addendum][xs]: fixes for tests after changes in last commit b64daea1a7.
This commit is contained in:
@@ -41,7 +41,7 @@ test("queryNormalize", function() {
|
|||||||
and: [
|
and: [
|
||||||
{
|
{
|
||||||
term: {
|
term: {
|
||||||
xyz: 'XXX'
|
xyz: 'xxx'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -65,7 +65,8 @@ test("queryNormalize", function() {
|
|||||||
and: [
|
and: [
|
||||||
{
|
{
|
||||||
geo_distance: {
|
geo_distance: {
|
||||||
distance: '10km',
|
distance: 10,
|
||||||
|
unit: 'km',
|
||||||
'xyz': { lon: 0, lat: 0 }
|
'xyz': { lon: 0, lat: 0 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -161,7 +161,8 @@ test('Query.addFilter', function () {
|
|||||||
|
|
||||||
query.addFilter({type: 'geo_distance', field: 'xyz'});
|
query.addFilter({type: 'geo_distance', field: 'xyz'});
|
||||||
var exp = {
|
var exp = {
|
||||||
distance: '10km',
|
distance: 10,
|
||||||
|
unit: 'km',
|
||||||
point: {
|
point: {
|
||||||
lon: 0,
|
lon: 0,
|
||||||
lat: 0
|
lat: 0
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ test('geo_distance', function () {
|
|||||||
$editForm = view.el.find('form.js-edit');
|
$editForm = view.el.find('form.js-edit');
|
||||||
equal($editForm.find('.filter-geo_distance').length, 1)
|
equal($editForm.find('.filter-geo_distance').length, 1)
|
||||||
deepEqual(_.keys(dataset.queryState.attributes.filters[0]), ['distance',
|
deepEqual(_.keys(dataset.queryState.attributes.filters[0]), ['distance',
|
||||||
'point', 'type', 'field']);
|
'unit', 'point', 'type', 'field']);
|
||||||
|
|
||||||
// now set filter value and apply
|
// now set filter value and apply
|
||||||
$editForm.find('input[name="lat"]').val(10);
|
$editForm.find('input[name="lat"]').val(10);
|
||||||
|
|||||||
Reference in New Issue
Block a user