@@ -885,6 +885,41 @@ describe('IgxGrid - Advanced Filtering', () => {
885
885
verifyEqualArrays ( dropdownValues , expectedValues ) ;
886
886
} ) ) ;
887
887
888
+ it ( 'Should not commit and close currently edited condition when the \'close\' button is clicked.' , fakeAsync ( ( ) => {
889
+ // Apply advanced filter through API.
890
+ const tree = new FilteringExpressionsTree ( FilteringLogic . And ) ;
891
+ tree . filteringOperands . push ( {
892
+ fieldName : 'Downloads' , searchVal : 100 , condition : IgxNumberFilteringOperand . instance ( ) . condition ( 'greaterThan' )
893
+ } ) ;
894
+ grid . advancedFilteringExpressionsTree = tree ;
895
+ fix . detectChanges ( ) ;
896
+
897
+ // Open Advanced Filtering dialog.
898
+ GridFunctions . clickAdvancedFilteringButton ( fix ) ;
899
+ fix . detectChanges ( ) ;
900
+
901
+ verifyExpressionChipContent ( fix , [ 0 ] , 'Downloads' , 'Greater Than' , '100' ) ;
902
+
903
+ // Edit the first expression in the inner 'or' group.
904
+ GridFunctions . clickAdvancedFilteringTreeExpressionChip ( fix , [ 0 ] , true ) ; // Double-click the chip
905
+ tick ( 200 ) ;
906
+ fix . detectChanges ( ) ;
907
+ const input = GridFunctions . getAdvancedFilteringValueInput ( fix ) . querySelector ( 'input' ) ;
908
+ sendInputNativeElement ( fix , input , '500' ) ; // Type filter value.
909
+
910
+ // Verify the edit mode container is visible.
911
+ expect ( GridFunctions . getAdvancedFilteringEditModeContainer ( fix ) ) . not . toBeNull ( ) ;
912
+
913
+ // Close the populated expression.
914
+ GridFunctions . clickAdvancedFilteringExpressionCloseButton ( fix ) ;
915
+ fix . detectChanges ( ) ;
916
+
917
+ // Verify the edit mode container is no longer visible.
918
+ expect ( GridFunctions . getAdvancedFilteringEditModeContainer ( fix ) ) . toBeNull ( ) ;
919
+
920
+ verifyExpressionChipContent ( fix , [ 0 ] , 'Downloads' , 'Greater Than' , '100' ) ;
921
+ } ) ) ;
922
+
888
923
it ( 'Should scroll the adding buttons into view when the add icon of a chip is clicked.' , ( async ( ) => {
889
924
// Apply advanced filter through API.
890
925
const tree = new FilteringExpressionsTree ( FilteringLogic . Or ) ;
0 commit comments