File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { render , type RenderResult , screen } from '@testing-library/react' ;
33import userEvent from '@testing-library/user-event' ;
4+ import type { dh as DhType } from '@deephaven/jsapi-types' ;
45import Aggregations , { type Aggregation } from './Aggregations' ;
56import AggregationOperation from './AggregationOperation' ;
67import { SELECTABLE_OPTIONS } from './AggregationUtils' ;
@@ -13,6 +14,25 @@ function makeAggregation({
1314 return { operation, selected, invert } ;
1415}
1516
17+ const MOCK_DH = {
18+ AggregationOperation : {
19+ SUM : 'SUM' ,
20+ ABS_SUM : 'ABS_SUM' ,
21+ MIN : 'MIN' ,
22+ MAX : 'MAX' ,
23+ VAR : 'VAR' ,
24+ AVG : 'AVG' ,
25+ MEDIAN : 'MEDIAN' ,
26+ STD : 'STD' ,
27+ FIRST : 'FIRST' ,
28+ LAST : 'LAST' ,
29+ COUNT_DISTINCT : 'COUNT_DISTINCT' ,
30+ DISTINCT : 'DISTINCT' ,
31+ COUNT : 'COUNT' ,
32+ UNIQUE : 'UNIQUE' ,
33+ } ,
34+ } as unknown as typeof DhType ;
35+
1636function mountAggregations ( {
1737 settings = { aggregations : [ ] as Aggregation [ ] , showOnTop : false } ,
1838 onChange = jest . fn ( ) ,
@@ -25,6 +45,7 @@ function mountAggregations({
2545 onChange = { onChange }
2646 onEdit = { onEdit }
2747 isRollup = { isRollup }
48+ dh = { MOCK_DH }
2849 />
2950 ) ;
3051}
You can’t perform that action at this time.
0 commit comments