|
4 | 4 | * you may not use this file except in compliance with the Elastic License. |
5 | 5 | */ |
6 | 6 |
|
7 | | -import { ESFieldedAggField } from './es_fielded_agg_field'; |
| 7 | +import { AggField } from './agg_field'; |
8 | 8 | import { AGG_TYPE, FIELD_ORIGIN } from '../../../common/constants'; |
9 | 9 | import { IESAggSource } from '../sources/es_agg_source'; |
10 | 10 | import { IIndexPattern } from 'src/plugins/data/public'; |
@@ -38,20 +38,20 @@ const defaultParams = { |
38 | 38 |
|
39 | 39 | describe('supportsFieldMeta', () => { |
40 | 40 | test('Non-counting aggregations should support field meta', () => { |
41 | | - const avgMetric = new ESFieldedAggField({ ...defaultParams, aggType: AGG_TYPE.AVG }); |
| 41 | + const avgMetric = new AggField({ ...defaultParams, aggType: AGG_TYPE.AVG }); |
42 | 42 | expect(avgMetric.supportsFieldMeta()).toBe(true); |
43 | | - const maxMetric = new ESFieldedAggField({ ...defaultParams, aggType: AGG_TYPE.MAX }); |
| 43 | + const maxMetric = new AggField({ ...defaultParams, aggType: AGG_TYPE.MAX }); |
44 | 44 | expect(maxMetric.supportsFieldMeta()).toBe(true); |
45 | | - const minMetric = new ESFieldedAggField({ ...defaultParams, aggType: AGG_TYPE.MIN }); |
| 45 | + const minMetric = new AggField({ ...defaultParams, aggType: AGG_TYPE.MIN }); |
46 | 46 | expect(minMetric.supportsFieldMeta()).toBe(true); |
47 | | - const termsMetric = new ESFieldedAggField({ ...defaultParams, aggType: AGG_TYPE.TERMS }); |
| 47 | + const termsMetric = new AggField({ ...defaultParams, aggType: AGG_TYPE.TERMS }); |
48 | 48 | expect(termsMetric.supportsFieldMeta()).toBe(true); |
49 | 49 | }); |
50 | 50 |
|
51 | 51 | test('Counting aggregations should not support field meta', () => { |
52 | | - const sumMetric = new ESFieldedAggField({ ...defaultParams, aggType: AGG_TYPE.SUM }); |
| 52 | + const sumMetric = new AggField({ ...defaultParams, aggType: AGG_TYPE.SUM }); |
53 | 53 | expect(sumMetric.supportsFieldMeta()).toBe(false); |
54 | | - const uniqueCountMetric = new ESFieldedAggField({ |
| 54 | + const uniqueCountMetric = new AggField({ |
55 | 55 | ...defaultParams, |
56 | 56 | aggType: AGG_TYPE.UNIQUE_COUNT, |
57 | 57 | }); |
|
0 commit comments