@@ -2746,7 +2746,37 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
2746
2746
grid ,
2747
2747
100 ,
2748
2748
'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' )
2750
2780
) ;
2751
2781
} ) ) ;
2752
2782
@@ -2776,7 +2806,37 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
2776
2806
grid ,
2777
2807
3 ,
2778
2808
'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' )
2780
2840
) ;
2781
2841
} ) ) ;
2782
2842
@@ -2810,12 +2870,48 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
2810
2870
grid ,
2811
2871
100 ,
2812
2872
'Downloads' ,
2813
- IgxStringFilteringOperand . instance ( ) . condition ( 'equals' ) ,
2873
+ IgxNumberFilteringOperand . instance ( ) . condition ( 'equals' ) ,
2814
2874
1 ,
2815
2875
2
2816
2876
) ;
2817
2877
} ) ) ;
2818
2878
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
+
2819
2915
it ( 'should emit filteringDone after chip is close from filtering row - Date column type' , fakeAsync ( ( ) => {
2820
2916
closeChipFromFiteringUIRow ( fix , grid , 'ReleaseDate' , 4 ) ;
2821
2917
} ) ) ;
@@ -2827,6 +2923,18 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
2827
2923
it ( 'should emit filteringDone after chip is close from filtering row - Number column type' , fakeAsync ( ( ) => {
2828
2924
closeChipFromFiteringUIRow ( fix , grid , 'Downloads' , 7 ) ;
2829
2925
} ) ) ;
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
+ } ) ) ;
2830
2938
} ) ;
2831
2939
} ) ;
2832
2940
@@ -5340,7 +5448,8 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
5340
5448
ReleaseDateTime : null ,
5341
5449
ReleaseTime : new Date ( 2010 , 4 , 27 , 23 , 0 , 0 ) ,
5342
5450
Released : false ,
5343
- AnotherField : 'BWord'
5451
+ AnotherField : 'BWord' ,
5452
+ Revenue : 60000
5344
5453
} ,
5345
5454
{
5346
5455
Downloads : 127 ,
@@ -5350,7 +5459,8 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
5350
5459
ReleaseDateTime : null ,
5351
5460
ReleaseTime : new Date ( 2021 , 4 , 27 , 1 , 0 , 0 ) ,
5352
5461
Released : true ,
5353
- AnotherField : 'bWord'
5462
+ AnotherField : 'bWord' ,
5463
+ Revenue : 50000
5354
5464
} ,
5355
5465
{
5356
5466
Downloads : 20 ,
@@ -5360,7 +5470,8 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
5360
5470
ReleaseDateTime : null ,
5361
5471
ReleaseTime : new Date ( 2015 , 4 , 27 , 12 , 0 , 0 ) ,
5362
5472
Released : null ,
5363
- AnotherField : 'aWord'
5473
+ AnotherField : 'aWord' ,
5474
+ Revenue : 100000
5364
5475
}
5365
5476
] ;
5366
5477
fix . componentInstance . data = data ;
@@ -6517,7 +6628,7 @@ const emitFilteringDoneOnInputClear = (fix, grid, filterVal, columnName, conditi
6517
6628
6518
6629
GridFunctions . clickFilterCellChip ( fix , columnName ) ;
6519
6630
6520
- spyOn ( grid . filteringDone , 'emit' ) ;
6631
+ // spyOn(grid.filteringDone, 'emit');
6521
6632
6522
6633
grid . filteringRow . onClearClick ( ) ;
6523
6634
tick ( 100 ) ;
0 commit comments