@@ -5322,6 +5322,57 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
53225322 expect ( loadingIndicator ) . toBeNull ( 'esf loading indicator is visible' ) ;
53235323 } ) ) ;
53245324
5325+ it ( 'Verify date values are displayed in correct format according to column formatter after filtering' , fakeAsync ( ( ) => {
5326+ registerLocaleData ( localeFR ) ;
5327+ const grid = fix . componentInstance . grid ;
5328+ grid . locale = 'fr-FR' ;
5329+ const datePipe = new DatePipe ( grid . locale ) ;
5330+ grid . getColumnByName ( 'ReleaseDate' ) . formatter = ( ( value : any ) => {
5331+ const pipe = new DatePipe ( 'fr-FR' ) ;
5332+ const val = value !== null && value !== undefined && value !== '' ? pipe . transform ( value , 'longDate' ) : 'No value!' ;
5333+ return val ;
5334+ } ) ;
5335+
5336+ const dates = fix . componentInstance . data . filter ( d => d . ReleaseDate !== null && d . ReleaseDate !== undefined )
5337+ . map ( el => new Date ( el . ReleaseDate ) ) . sort ( ( a , b ) => a - b ) ;
5338+ fix . detectChanges ( ) ;
5339+
5340+ // Open excel style custom filtering dialog and wait a bit.
5341+ GridFunctions . clickExcelFilterIcon ( fix , 'ReleaseDate' ) ;
5342+ tick ( 1050 ) ;
5343+ fix . detectChanges ( ) ;
5344+
5345+ // Verify items in search have loaded and that the loading indicator is not visible.
5346+ let listItems = GridFunctions . getExcelStyleSearchComponentListItems ( fix ) ;
5347+ expect ( listItems . length ) . toBe ( 8 , 'incorrect rendered list items count' ) ;
5348+
5349+ const checkboxElements = GridFunctions . getExcelStyleFilteringCheckboxes ( fix ) ;
5350+ checkboxElements [ 2 ] . click ( ) ;
5351+ tick ( ) ;
5352+ fix . detectChanges ( ) ;
5353+
5354+ GridFunctions . clickApplyExcelStyleFiltering ( fix ) ;
5355+ fix . detectChanges ( ) ;
5356+
5357+ // Open excel style custom filtering dialog and wait a bit.
5358+ GridFunctions . clickExcelFilterIcon ( fix , 'ReleaseDate' ) ;
5359+ tick ( 1050 ) ;
5360+ fix . detectChanges ( ) ;
5361+
5362+ listItems = GridFunctions . getExcelStyleSearchComponentListItems ( fix ) ;
5363+ expect ( listItems . length ) . toBe ( 8 , 'incorrect rendered list items count' ) ;
5364+
5365+ expect ( listItems [ 1 ] . innerText ) . toBe ( 'No value!' ) ;
5366+ for ( let i = 2 ; i < listItems . length ; i ++ ) {
5367+ const date = dates [ i - 2 ] ;
5368+ const label = date !== null && date !== undefined && date !== '' ? datePipe . transform ( date , 'longDate' ) : 'No value!' ;
5369+ expect ( listItems [ i ] . innerText ) . toBe ( label ) ;
5370+ }
5371+
5372+ const loadingIndicator = GridFunctions . getExcelFilteringLoadingIndicator ( fix ) ;
5373+ expect ( loadingIndicator ) . toBeNull ( 'esf loading indicator is visible' ) ;
5374+ } ) ) ;
5375+
53255376 it ( 'Done callback should be executed only once per column' , fakeAsync ( ( ) => {
53265377 const compInstance = fix . componentInstance as IgxGridFilteringESFLoadOnDemandComponent ;
53275378 // Open excel style custom filtering dialog and wait a bit.
0 commit comments