@@ -198,27 +198,27 @@ describe('gridMenuExtension', () => {
198198
199199 it ( `should call internal event handler subscribe and expect the "onColumnsChanged" option to be called
200200 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+ } ) ;
222222
223223 it ( 'should call internal event handler subscribe and expect the "onBeforeMenuShow" option to be called when addon notify is called' , ( ) => {
224224 const handlerSpy = jest . spyOn ( extension . eventHandler , 'subscribe' ) ;
@@ -501,7 +501,7 @@ describe('gridMenuExtension', () => {
501501 const query = `query { users (first:20,offset:0) { totalCount, nodes { id,name,gender,company } } }` ;
502502 const processResult = {
503503 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 }
505505 } ;
506506 const preSpy = jest . spyOn ( gridOptionsMock . backendServiceApi , 'preProcess' ) ;
507507 const postSpy = jest . spyOn ( gridOptionsMock . backendServiceApi , 'postProcess' ) ;
0 commit comments