@@ -13,6 +13,7 @@ import { GridFunctions } from '../../test-utils/grid-functions.spec';
13
13
import { UIInteractions } from '../../test-utils/ui-interactions.spec' ;
14
14
import { SampleTestData } from '../../test-utils/sample-test-data.spec' ;
15
15
import { By } from '@angular/platform-browser' ;
16
+ import { GridColumnDataType } from '../../data-operations/data-util' ;
16
17
17
18
const IGX_CHECKBOX_LABEL = '.igx-checkbox__label' ;
18
19
@@ -751,6 +752,29 @@ describe('IgxTreeGrid - Filtering actions #tGrid', () => {
751
752
emptyTextEl = searchComponent . querySelector ( '.igx-excel-filter__empty' ) ;
752
753
expect ( emptyTextEl . innerText ) . toEqual ( 'No matches' ) ;
753
754
} ) ) ;
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
+ } ) ) ;
754
778
} ) ;
755
779
756
780
describe ( 'Tree grid ESF templates' , ( ) => {
0 commit comments