@@ -2746,7 +2746,37 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
27462746 grid ,
27472747 100 ,
27482748 'Downloads' ,
2749- IgxStringFilteringOperand . instance ( ) . condition ( 'equals' )
2749+ IgxNumberFilteringOperand . instance ( ) . condition ( 'equals' )
2750+ ) ;
2751+ } ) ) ;
2752+
2753+ it ( 'Should emit filteringDone when we clicked reset - Currency column type' , fakeAsync ( ( ) => {
2754+ emitFilteringDoneOnResetClick (
2755+ fix ,
2756+ grid ,
2757+ 100000 ,
2758+ 'Revenue' ,
2759+ IgxNumberFilteringOperand . instance ( ) . condition ( 'equals' )
2760+ ) ;
2761+ } ) ) ;
2762+
2763+ it ( 'Should emit filteringDone when we clicked reset - Boolean column type' , fakeAsync ( ( ) => {
2764+ emitFilteringDoneOnResetClick (
2765+ fix ,
2766+ grid ,
2767+ true ,
2768+ 'Released' ,
2769+ IgxBooleanFilteringOperand . instance ( ) . condition ( 'true' )
2770+ ) ;
2771+ } ) ) ;
2772+
2773+ it ( 'Should emit filteringDone when we clicked reset - DateTime column type' , fakeAsync ( ( ) => {
2774+ emitFilteringDoneOnResetClick (
2775+ fix ,
2776+ grid ,
2777+ cal . timedelta ( today , 'hour' , 1 ) ,
2778+ 'ReleaseTime' ,
2779+ IgxDateTimeFilteringOperand . instance ( ) . condition ( 'equals' )
27502780 ) ;
27512781 } ) ) ;
27522782
@@ -2776,7 +2806,37 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
27762806 grid ,
27772807 3 ,
27782808 'Downloads' ,
2779- IgxStringFilteringOperand . instance ( ) . condition ( 'equals' )
2809+ IgxNumberFilteringOperand . instance ( ) . condition ( 'equals' )
2810+ ) ;
2811+ } ) ) ;
2812+
2813+ it ( 'Should emit filteringDone when clear the input of filteringUI - Currency column type' , fakeAsync ( ( ) => {
2814+ emitFilteringDoneOnInputClear (
2815+ fix ,
2816+ grid ,
2817+ 100000 ,
2818+ 'Revenue' ,
2819+ IgxNumberFilteringOperand . instance ( ) . condition ( 'equals' )
2820+ ) ;
2821+ } ) ) ;
2822+
2823+ it ( 'Should emit filteringDone when clear the input of filteringUI - Boolean column type' , fakeAsync ( ( ) => {
2824+ emitFilteringDoneOnInputClear (
2825+ fix ,
2826+ grid ,
2827+ true ,
2828+ 'Released' ,
2829+ IgxBooleanFilteringOperand . instance ( ) . condition ( 'true' )
2830+ ) ;
2831+ } ) ) ;
2832+
2833+ it ( 'Should emit filteringDone when clear the input of filteringUI - DateTime column type' , fakeAsync ( ( ) => {
2834+ emitFilteringDoneOnInputClear (
2835+ fix ,
2836+ grid ,
2837+ cal . timedelta ( today , 'hour' , 1 ) ,
2838+ 'ReleaseTime' ,
2839+ IgxDateTimeFilteringOperand . instance ( ) . condition ( 'equals' )
27802840 ) ;
27812841 } ) ) ;
27822842
@@ -2810,12 +2870,48 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
28102870 grid ,
28112871 100 ,
28122872 'Downloads' ,
2813- IgxStringFilteringOperand . instance ( ) . condition ( 'equals' ) ,
2873+ IgxNumberFilteringOperand . instance ( ) . condition ( 'equals' ) ,
28142874 1 ,
28152875 2
28162876 ) ;
28172877 } ) ) ;
28182878
2879+ it ( 'should update UI when chip is removed from header cell - Currency column type.' , fakeAsync ( ( ) => {
2880+ verifyRemoveChipFromHeader (
2881+ fix ,
2882+ grid ,
2883+ 100000 ,
2884+ 'Revenue' ,
2885+ IgxNumberFilteringOperand . instance ( ) . condition ( 'equals' ) ,
2886+ 1 ,
2887+ 7
2888+ ) ;
2889+ } ) ) ;
2890+
2891+ it ( 'should update UI when chip is removed from header cell - Boolean column type.' , fakeAsync ( ( ) => {
2892+ verifyRemoveChipFromHeader (
2893+ fix ,
2894+ grid ,
2895+ true ,
2896+ 'Released' ,
2897+ IgxBooleanFilteringOperand . instance ( ) . condition ( 'true' ) ,
2898+ 3 ,
2899+ 3
2900+ ) ;
2901+ } ) ) ;
2902+
2903+ it ( 'should update UI when chip is removed from header cell - DateTime column type.' , fakeAsync ( ( ) => {
2904+ verifyRemoveChipFromHeader (
2905+ fix ,
2906+ grid ,
2907+ cal . timedelta ( today , 'hour' , 1 ) ,
2908+ 'ReleaseTime' ,
2909+ IgxDateTimeFilteringOperand . instance ( ) . condition ( 'equals' ) ,
2910+ 3 ,
2911+ 6
2912+ ) ;
2913+ } ) ) ;
2914+
28192915 it ( 'should emit filteringDone after chip is close from filtering row - Date column type' , fakeAsync ( ( ) => {
28202916 closeChipFromFiteringUIRow ( fix , grid , 'ReleaseDate' , 4 ) ;
28212917 } ) ) ;
@@ -2827,6 +2923,18 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
28272923 it ( 'should emit filteringDone after chip is close from filtering row - Number column type' , fakeAsync ( ( ) => {
28282924 closeChipFromFiteringUIRow ( fix , grid , 'Downloads' , 7 ) ;
28292925 } ) ) ;
2926+
2927+ it ( 'should emit filteringDone after chip is close from filtering row - Currency column type' , fakeAsync ( ( ) => {
2928+ closeChipFromFiteringUIRow ( fix , grid , 'Revenue' , 7 ) ;
2929+ } ) ) ;
2930+
2931+ it ( 'should emit filteringDone after chip is close from filtering row - Boolean column type' , fakeAsync ( ( ) => {
2932+ closeChipFromFiteringUIRow ( fix , grid , 'Released' , 1 ) ;
2933+ } ) ) ;
2934+
2935+ it ( 'should emit filteringDone after chip is close from filtering row - DateTime column type' , fakeAsync ( ( ) => {
2936+ closeChipFromFiteringUIRow ( fix , grid , 'ReleaseTime' , 4 ) ;
2937+ } ) ) ;
28302938 } ) ;
28312939} ) ;
28322940
@@ -5340,7 +5448,8 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
53405448 ReleaseDateTime : null ,
53415449 ReleaseTime : new Date ( 2010 , 4 , 27 , 23 , 0 , 0 ) ,
53425450 Released : false ,
5343- AnotherField : 'BWord'
5451+ AnotherField : 'BWord' ,
5452+ Revenue : 60000
53445453 } ,
53455454 {
53465455 Downloads : 127 ,
@@ -5350,7 +5459,8 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
53505459 ReleaseDateTime : null ,
53515460 ReleaseTime : new Date ( 2021 , 4 , 27 , 1 , 0 , 0 ) ,
53525461 Released : true ,
5353- AnotherField : 'bWord'
5462+ AnotherField : 'bWord' ,
5463+ Revenue : 50000
53545464 } ,
53555465 {
53565466 Downloads : 20 ,
@@ -5360,7 +5470,8 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
53605470 ReleaseDateTime : null ,
53615471 ReleaseTime : new Date ( 2015 , 4 , 27 , 12 , 0 , 0 ) ,
53625472 Released : null ,
5363- AnotherField : 'aWord'
5473+ AnotherField : 'aWord' ,
5474+ Revenue : 100000
53645475 }
53655476 ] ;
53665477 fix . componentInstance . data = data ;
@@ -6517,7 +6628,7 @@ const emitFilteringDoneOnInputClear = (fix, grid, filterVal, columnName, conditi
65176628
65186629 GridFunctions . clickFilterCellChip ( fix , columnName ) ;
65196630
6520- spyOn ( grid . filteringDone , 'emit' ) ;
6631+ // spyOn(grid.filteringDone, 'emit');
65216632
65226633 grid . filteringRow . onClearClick ( ) ;
65236634 tick ( 100 ) ;
0 commit comments