Skip to content

Commit

Permalink
tweak assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed Feb 23, 2023
1 parent 5a4d556 commit 6d46f70
Showing 1 changed file with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
*/

import { getPivotDropdownOptions } from '.';
import { DataView } from '@kbn/data-views-plugin/public';
import type { DataView } from '@kbn/data-views-plugin/public';
import { FilterAggForm } from './filter_agg/components';
import type { RuntimeField } from '@kbn/data-views-plugin/common';
import { PercentilesAggForm } from './percentiles_agg/percentiles_form_component';

describe('Transform: Define Pivot Common', () => {
test('getPivotDropdownOptions()', () => {
Expand Down Expand Up @@ -79,17 +81,15 @@ describe('Transform: Define Pivot Common', () => {
field: ' the-f[i]e>ld ',
aggName: 'the-field.percentiles',
dropDownName: 'percentiles( the-f[i]e>ld )',
isSubAggsSupported: false,
isMultiField: false,
AggFormComponent: PercentilesAggForm,
aggConfig: { percents: '1,5,25,50,75,95,99' },
},
'filter( the-f[i]e>ld )': {
agg: 'filter',
field: ' the-f[i]e>ld ',
aggName: 'the-field.filter',
dropDownName: 'filter( the-f[i]e>ld )',
isSubAggsSupported: true,
aggConfig: {},
AggFormComponent: FilterAggForm,
},
'sum( the-f[i]e>ld )': {
agg: 'sum',
Expand Down Expand Up @@ -221,8 +221,7 @@ describe('Transform: Define Pivot Common', () => {
aggName: 'the-field.percentiles',
dropDownName: 'percentiles( the-f[i]e>ld )',
field: ' the-f[i]e>ld ',
isSubAggsSupported: false,
isMultiField: false,
AggFormComponent: PercentilesAggForm,
aggConfig: { percents: '1,5,25,50,75,95,99' },
},
'sum( the-f[i]e>ld )': {
Expand All @@ -243,7 +242,7 @@ describe('Transform: Define Pivot Common', () => {
dropDownName: 'filter( the-f[i]e>ld )',
field: ' the-f[i]e>ld ',
isSubAggsSupported: true,
aggConfig: {},
AggFormComponent: FilterAggForm,
},
'terms( the-f[i]e>ld )': {
agg: 'terms',
Expand Down Expand Up @@ -292,8 +291,7 @@ describe('Transform: Define Pivot Common', () => {
aggName: 'rt_bytes_bigger.percentiles',
dropDownName: 'percentiles(rt_bytes_bigger)',
field: 'rt_bytes_bigger',
isSubAggsSupported: false,
isMultiField: false,
AggFormComponent: PercentilesAggForm,
aggConfig: { percents: '1,5,25,50,75,95,99' },
},
'sum(rt_bytes_bigger)': {
Expand All @@ -314,7 +312,7 @@ describe('Transform: Define Pivot Common', () => {
dropDownName: 'filter(rt_bytes_bigger)',
field: 'rt_bytes_bigger',
isSubAggsSupported: true,
aggConfig: {},
AggFormComponent: FilterAggForm,
},
'terms(rt_bytes_bigger)': {
agg: 'terms',
Expand Down

0 comments on commit 6d46f70

Please sign in to comment.