mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-10 19:52:53 +00:00
refactor: use core supplied mappings
This commit is contained in:
committed by
Rainer Killinger
parent
614a1b1e9b
commit
43a89ec4f2
@@ -22,15 +22,19 @@ import {
|
||||
SCThingType
|
||||
} from '@openstapps/core';
|
||||
import {expect} from 'chai';
|
||||
import {ESDateRangeFilter, ESRangeFilter} from '../../../src/storage/elasticsearch/common';
|
||||
import {ESNumericRangeFilter} from '../../../src/storage/elasticsearch/common';
|
||||
import {configFile} from '../../../src/common';
|
||||
import {
|
||||
ElasticsearchConfig, ESBooleanFilter, ESGenericSort, ESGeoDistanceFilter,
|
||||
ESDateRangeFilter,
|
||||
ESRangeFilter,
|
||||
ESNumericRangeFilter,
|
||||
ElasticsearchConfig,
|
||||
ESBooleanFilter,
|
||||
ESGenericSort,
|
||||
ESGeoDistanceFilter,
|
||||
ESGeoDistanceSort,
|
||||
ESTermFilter,
|
||||
ScriptSort
|
||||
} from '../../../src/storage/elasticsearch/common';
|
||||
} from '../../../src/storage/elasticsearch/types/elasticsearch';
|
||||
import {configFile} from '../../../src/common';
|
||||
import {buildBooleanFilter, buildFilter, buildQuery, buildSort} from '../../../src/storage/elasticsearch/query';
|
||||
|
||||
describe('Query', function () {
|
||||
@@ -366,7 +370,7 @@ describe('Query', function () {
|
||||
}
|
||||
});
|
||||
|
||||
it('should default to second scope', function() {
|
||||
it('should default to second scope', function () {
|
||||
const filter = buildFilter({
|
||||
type: 'availability',
|
||||
arguments: {
|
||||
@@ -384,7 +388,7 @@ describe('Query', function () {
|
||||
},
|
||||
};
|
||||
expect(filter).to.be.eql(expectedFilter);
|
||||
})
|
||||
});
|
||||
|
||||
it('should add || to dates', function () {
|
||||
const filter = buildFilter({
|
||||
|
||||
Reference in New Issue
Block a user