@@ -13,6 +13,7 @@ import { GridFunctions } from '../../test-utils/grid-functions.spec';
1313import { UIInteractions } from '../../test-utils/ui-interactions.spec' ;
1414import { SampleTestData } from '../../test-utils/sample-test-data.spec' ;
1515import { By } from '@angular/platform-browser' ;
16+ import { GridColumnDataType } from '../../data-operations/data-util' ;
1617
1718const IGX_CHECKBOX_LABEL = '.igx-checkbox__label' ;
1819
@@ -751,6 +752,29 @@ describe('IgxTreeGrid - Filtering actions #tGrid', () => {
751752 emptyTextEl = searchComponent . querySelector ( '.igx-excel-filter__empty' ) ;
752753 expect ( emptyTextEl . innerText ) . toEqual ( 'No matches' ) ;
753754 } ) ) ;
755+
756+ it ( 'Should not throw console error when number column with dataType string is filtered.' , fakeAsync ( ( ) => {
757+ tGrid . columns [ 0 ] . dataType = GridColumnDataType . String ;
758+ fix . detectChanges ( ) ;
759+ spyOn ( console , 'error' ) ;
760+
761+ GridFunctions . clickExcelFilterIcon ( fix , 'ID' ) ;
762+ fix . detectChanges ( ) ;
763+ tick ( ) ;
764+
765+ const excelMenu = GridFunctions . getExcelStyleFilteringComponent ( fix , 'igx-tree-grid' ) ;
766+ const checkboxes : any [ ] = Array . from ( GridFunctions . getExcelStyleFilteringCheckboxes ( fix , excelMenu , 'igx-tree-grid' ) ) ;
767+
768+ checkboxes [ 2 ] . click ( ) ;
769+ tick ( ) ;
770+ fix . detectChanges ( ) ;
771+
772+ GridFunctions . clickApplyExcelStyleFiltering ( fix , null , 'igx-tree-grid' ) ;
773+ fix . detectChanges ( ) ;
774+ tick ( ) ;
775+
776+ expect ( console . error ) . not . toHaveBeenCalled ( ) ;
777+ } ) ) ;
754778 } ) ;
755779
756780 describe ( 'Tree grid ESF templates' , ( ) => {
0 commit comments