@@ -6013,6 +6013,39 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
60136013 expect ( checkboxes [ 0 ] . indeterminate ) . toBeTrue ( ) ;
60146014 } ) ) ;
60156015
6016+ it ( 'Should enable the `Apply` button & filter properly when "Add to current filter selection" is the only selected option.' , fakeAsync ( ( ) => {
6017+ // Open excel style custom filtering dialog.
6018+ GridFunctions . clickExcelFilterIconFromCode ( fix , grid , 'Downloads' ) ;
6019+
6020+ // Type string in search box.
6021+ const searchComponent = GridFunctions . getExcelStyleSearchComponent ( fix ) ;
6022+ const inputNativeElement = GridFunctions . getExcelStyleSearchComponentInput ( fix , searchComponent ) ;
6023+ UIInteractions . clickAndSendInputElementValue ( inputNativeElement , '5' , fix ) ;
6024+ fix . detectChanges ( ) ;
6025+ tick ( ) ;
6026+
6027+ const excelMenu = GridFunctions . getExcelStyleFilteringComponent ( fix ) ;
6028+ const checkboxes : any [ ] = Array . from ( GridFunctions . getExcelStyleFilteringCheckboxes ( fix , excelMenu ) ) ;
6029+ expect ( checkboxes . length ) . toBe ( 3 ) ;
6030+ checkboxes [ 0 ] . click ( ) ; // Uncheck 'Select All'
6031+ checkboxes [ 1 ] . click ( ) ; // Check 'Add to current filter selection'
6032+ fix . detectChanges ( ) ;
6033+ tick ( ) ;
6034+
6035+ // Click 'apply' button to apply filter.
6036+ const applyButton = GridFunctions . getApplyButtonExcelStyleFiltering ( fix , excelMenu ) ;
6037+ expect ( applyButton . disabled ) . toBeFalse ( ) ;
6038+ applyButton . click ( ) ;
6039+ fix . detectChanges ( ) ;
6040+ tick ( ) ;
6041+
6042+ // Get the results and verify that they match the list items.
6043+ const gridCellValues = GridFunctions . getColumnCells ( fix , 'Downloads' ) ;
6044+
6045+ // Record with '254' downloads is filtered out.
6046+ expect ( gridCellValues . length ) . toEqual ( 7 ) ;
6047+ } ) ) ;
6048+
60166049 it ( 'Should commit and close ESF on pressing \'Enter\'' , fakeAsync ( ( ) => {
60176050 // Open excel style filtering dialog.
60186051 GridFunctions . clickExcelFilterIconFromCode ( fix , grid , 'Downloads' ) ;
0 commit comments