@@ -4651,7 +4651,49 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
46514651 expect ( excelMenu ) . not . toBeNull ( ) ;
46524652 expect ( inputNativeElement . value ) . toBe ( '' , 'input isn\'t cleared correctly' ) ;
46534653 } ) ) ;
4654- } ) ;
4654+
4655+ it ( 'Should clear search criteria when selecting clear column filters option.' , fakeAsync ( ( ) => {
4656+ GridFunctions . clickExcelFilterIconFromCode ( fix , grid , 'ProductName' ) ;
4657+
4658+ let checkboxes = GridFunctions . getExcelStyleFilteringCheckboxes ( fix ) ;
4659+ fix . detectChanges ( ) ;
4660+
4661+ checkboxes [ 0 ] . click ( ) ;
4662+ tick ( ) ;
4663+ fix . detectChanges ( ) ;
4664+
4665+ checkboxes [ 2 ] . click ( ) ;
4666+ tick ( ) ;
4667+ fix . detectChanges ( ) ;
4668+
4669+ GridFunctions . clickApplyExcelStyleFiltering ( fix ) ;
4670+ tick ( ) ;
4671+ fix . detectChanges ( ) ;
4672+ expect ( grid . filteredData . length ) . toEqual ( 1 ) ;
4673+
4674+ GridFunctions . clickExcelFilterIconFromCode ( fix , grid , 'ProductName' ) ;
4675+ flush ( ) ;
4676+
4677+ let inputNativeElement = GridFunctions . getExcelStyleSearchComponentInput ( fix ) ;
4678+ UIInteractions . clickAndSendInputElementValue ( inputNativeElement , 'Net' , fix ) ;
4679+
4680+ const listItems = GridFunctions . getExcelStyleSearchComponentListItems ( fix ) ;
4681+ expect ( listItems . length ) . toBe ( 3 , 'incorrect rendered list items count' ) ;
4682+
4683+ GridFunctions . clickClearFilterInExcelStyleFiltering ( fix ) ;
4684+ flush ( ) ;
4685+ expect ( grid . filteredData ) . toBeNull ( ) ;
4686+
4687+ inputNativeElement = GridFunctions . getExcelStyleSearchComponentInput ( fix ) ;
4688+ expect ( inputNativeElement . value ) . toBe ( '' , 'search criteria is not cleared' ) ;
4689+
4690+ checkboxes = GridFunctions . getExcelStyleFilteringCheckboxes ( fix ) ;
4691+ const listItemsCheckboxes = checkboxes . slice ( 1 , checkboxes . length ) ;
4692+ for ( const checkbox of listItemsCheckboxes ) {
4693+ ControlsFunction . verifyCheckboxState ( checkbox . parentElement ) ;
4694+ }
4695+ } ) ) ;
4696+ } ) ;
46554697
46564698 describe ( 'Templates: ' , ( ) => {
46574699 let fix , grid ;
@@ -4801,6 +4843,23 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
48014843 GridSelectionFunctions . verifyColumnAndCellsSelected ( columnId , false ) ;
48024844
48034845 } ) ;
4846+
4847+ it ( 'Should reset esf menu with templates on column change' , fakeAsync ( ( ) => {
4848+ GridFunctions . clickExcelFilterIconFromCode ( fix , grid , 'Downloads' ) ;
4849+ flush ( ) ;
4850+
4851+ let inputNativeElement = GridFunctions . getExcelStyleSearchComponentInput ( fix ) ;
4852+ UIInteractions . clickAndSendInputElementValue ( inputNativeElement , 20 , fix ) ;
4853+
4854+ const listItems = GridFunctions . getExcelStyleSearchComponentListItems ( fix ) ;
4855+ expect ( listItems . length ) . toBe ( 3 , 'incorrect rendered list items count' ) ;
4856+
4857+ GridFunctions . clickExcelFilterIconFromCode ( fix , grid , 'ProductName' ) ;
4858+ flush ( ) ;
4859+
4860+ inputNativeElement = GridFunctions . getExcelStyleSearchComponentInput ( fix ) ;
4861+ expect ( inputNativeElement . value ) . toBe ( '' , 'input value didn\'t reset' ) ;
4862+ } ) ) ;
48044863 } ) ;
48054864
48064865 describe ( 'Load values on demand' , ( ) => {
0 commit comments