@@ -198,27 +198,27 @@ describe('gridMenuExtension', () => {
198
198
199
199
it ( `should call internal event handler subscribe and expect the "onColumnsChanged" option to be called
200
200
and it should override "visibleColumns" when array passed as arguments is bigger than previous visible columns` , ( ) => {
201
- const handlerSpy = jest . spyOn ( extension . eventHandler , 'subscribe' ) ;
202
- const onColumnSpy = jest . spyOn ( SharedService . prototype . gridOptions . gridMenu , 'onColumnsChanged' ) ;
203
- const onBeforeSpy = jest . spyOn ( SharedService . prototype . gridOptions . gridMenu , 'onBeforeMenuShow' ) ;
204
- const onCloseSpy = jest . spyOn ( SharedService . prototype . gridOptions . gridMenu , 'onMenuClose' ) ;
205
- const onCommandSpy = jest . spyOn ( SharedService . prototype . gridOptions . gridMenu , 'onCommand' ) ;
206
- const visibleColsSpy = jest . spyOn ( SharedService . prototype , 'visibleColumns' , 'set' ) ;
207
-
208
- const instance = extension . register ( ) ;
209
- instance . onColumnsChanged . notify ( { columns : columnsMock , grid : gridStub } , new Slick . EventData ( ) , gridStub ) ;
210
-
211
- expect ( handlerSpy ) . toHaveBeenCalledTimes ( 4 ) ;
212
- expect ( handlerSpy ) . toHaveBeenCalledWith (
213
- { notify : expect . anything ( ) , subscribe : expect . anything ( ) , unsubscribe : expect . anything ( ) , } ,
214
- expect . anything ( )
215
- ) ;
216
- expect ( onColumnSpy ) . toHaveBeenCalledWith ( expect . anything ( ) , { columns : columnsMock , grid : gridStub } ) ;
217
- expect ( onBeforeSpy ) . not . toHaveBeenCalled ( ) ;
218
- expect ( onCloseSpy ) . not . toHaveBeenCalled ( ) ;
219
- expect ( onCommandSpy ) . not . toHaveBeenCalled ( ) ;
220
- expect ( visibleColsSpy ) . toHaveBeenCalledWith ( columnsMock ) ;
221
- } ) ;
201
+ const handlerSpy = jest . spyOn ( extension . eventHandler , 'subscribe' ) ;
202
+ const onColumnSpy = jest . spyOn ( SharedService . prototype . gridOptions . gridMenu , 'onColumnsChanged' ) ;
203
+ const onBeforeSpy = jest . spyOn ( SharedService . prototype . gridOptions . gridMenu , 'onBeforeMenuShow' ) ;
204
+ const onCloseSpy = jest . spyOn ( SharedService . prototype . gridOptions . gridMenu , 'onMenuClose' ) ;
205
+ const onCommandSpy = jest . spyOn ( SharedService . prototype . gridOptions . gridMenu , 'onCommand' ) ;
206
+ const visibleColsSpy = jest . spyOn ( SharedService . prototype , 'visibleColumns' , 'set' ) ;
207
+
208
+ const instance = extension . register ( ) ;
209
+ instance . onColumnsChanged . notify ( { columns : columnsMock , grid : gridStub } , new Slick . EventData ( ) , gridStub ) ;
210
+
211
+ expect ( handlerSpy ) . toHaveBeenCalledTimes ( 4 ) ;
212
+ expect ( handlerSpy ) . toHaveBeenCalledWith (
213
+ { notify : expect . anything ( ) , subscribe : expect . anything ( ) , unsubscribe : expect . anything ( ) , } ,
214
+ expect . anything ( )
215
+ ) ;
216
+ expect ( onColumnSpy ) . toHaveBeenCalledWith ( expect . anything ( ) , { columns : columnsMock , grid : gridStub } ) ;
217
+ expect ( onBeforeSpy ) . not . toHaveBeenCalled ( ) ;
218
+ expect ( onCloseSpy ) . not . toHaveBeenCalled ( ) ;
219
+ expect ( onCommandSpy ) . not . toHaveBeenCalled ( ) ;
220
+ expect ( visibleColsSpy ) . toHaveBeenCalledWith ( columnsMock ) ;
221
+ } ) ;
222
222
223
223
it ( 'should call internal event handler subscribe and expect the "onBeforeMenuShow" option to be called when addon notify is called' , ( ) => {
224
224
const handlerSpy = jest . spyOn ( extension . eventHandler , 'subscribe' ) ;
@@ -501,7 +501,7 @@ describe('gridMenuExtension', () => {
501
501
const query = `query { users (first:20,offset:0) { totalCount, nodes { id,name,gender,company } } }` ;
502
502
const processResult = {
503
503
data : { users : { nodes : [ ] } , pageInfo : { hasNextPage : true } , totalCount : 0 } ,
504
- statistics : { startTime : now , endTime : now , executionTime : 0 , totalItemCount : 0 }
504
+ metrics : { startTime : now , endTime : now , executionTime : 0 , totalItemCount : 0 }
505
505
} ;
506
506
const preSpy = jest . spyOn ( gridOptionsMock . backendServiceApi , 'preProcess' ) ;
507
507
const postSpy = jest . spyOn ( gridOptionsMock . backendServiceApi , 'postProcess' ) ;
0 commit comments