@@ -3990,8 +3990,8 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
39903990 fix . detectChanges ( ) ;
39913991
39923992 verifyExcelStyleFilterAvailableOptions ( fix ,
3993- [ 'Select All' , '(Blanks)' , '0' , '20' , '100' , '127' , '254' ] ,
3994- [ true , true , true , true , true , true , true ] ) ;
3993+ [ 'Select All' , '(Blanks)' , '0' , '20' , '100' , '127' , '254' , '702' , '1,000' ] ,
3994+ [ true , true , true , true , true , true , true , true , true ] ) ;
39953995
39963996 GridFunctions . clickExcelFilterIcon ( fix , 'ProductName' ) ;
39973997 tick ( 100 ) ;
@@ -4780,33 +4780,27 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
47804780 const column = grid . getColumnByName ( 'AnotherField' ) ;
47814781 expect ( column . filteringIgnoreCase ) . toBeTrue ( ) ;
47824782
4783- GridFunctions . clickExcelFilterIconFromCode ( fix , grid , 'AnotherField' ) ;
4783+ GridFunctions . clickExcelFilterIcon ( fix , 'AnotherField' ) ;
47844784 tick ( 100 ) ;
47854785 fix . detectChanges ( ) ;
47864786
4787- const searchComponent = GridFunctions . getExcelStyleSearchComponent ( fix ) ;
4788- const listItems = GridFunctions . getExcelStyleSearchComponentListItems ( fix , searchComponent ) ;
4789-
4790- expect ( listItems . length ) . toBe ( 3 , 'incorrect rendered list items count' ) ;
4791- expect ( listItems [ 1 ] . innerText ) . toBe ( 'Custom' , 'incorrect list item label' ) ;
4787+ verifyExcelStyleFilterAvailableOptions ( fix ,
4788+ [ 'Select All' , 'a' , 'Custom' ] ,
4789+ [ true , true , true ] ) ;
47924790 } ) ) ;
47934791
47944792 it ( 'Should not ignore duplicate records when column\'\s filteringIgnoreCase is false' , fakeAsync ( ( ) => {
47954793 const column = grid . getColumnByName ( 'AnotherField' ) ;
47964794 column . filteringIgnoreCase = false ;
47974795 expect ( column . filteringIgnoreCase ) . toBeFalse ( ) ;
47984796
4799- GridFunctions . clickExcelFilterIconFromCode ( fix , grid , 'AnotherField' ) ;
4797+ GridFunctions . clickExcelFilterIcon ( fix , 'AnotherField' ) ;
48004798 tick ( 100 ) ;
48014799 fix . detectChanges ( ) ;
48024800
4803- const searchComponent = GridFunctions . getExcelStyleSearchComponent ( fix ) ;
4804- const listItems = GridFunctions . getExcelStyleSearchComponentListItems ( fix , searchComponent ) ;
4805-
4806- expect ( listItems . length ) . toBe ( 5 , 'incorrect rendered list items count' ) ;
4807- expect ( listItems [ 1 ] . innerText ) . toBe ( 'Custom' , 'incorrect list item label' ) ;
4808- expect ( listItems [ 3 ] . innerText ) . toBe ( 'custoM' , 'incorrect list item label' ) ;
4809- expect ( listItems [ 4 ] . innerText ) . toBe ( 'custom' , 'incorrect list item label' ) ;
4801+ verifyExcelStyleFilterAvailableOptions ( fix ,
4802+ [ 'Select All' , 'Custom' , 'a' , 'custoM' , 'custom' ] ,
4803+ [ true , true , true , true , true ] ) ;
48104804 } ) ) ;
48114805
48124806 it ( 'Should display "Add to current filter selection" button on typing in input' , fakeAsync ( ( ) => {
@@ -5135,6 +5129,47 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
51355129 expect ( listItems [ 2 ] . innerText ) . toBe ( 'No' , 'incorrect list item label' ) ;
51365130 expect ( listItems [ 3 ] . innerText ) . toBe ( 'Yes' , 'incorrect list item label' ) ;
51375131 } ) ) ;
5132+
5133+ it ( 'Should sort items in excel style search case INsensitive' , fakeAsync ( ( ) => {
5134+ const data = [
5135+ {
5136+ Downloads : 254 ,
5137+ ID : 1 ,
5138+ ProductName : 'Ignite UI for JavaScript' ,
5139+ ReleaseDate : null ,
5140+ Released : false ,
5141+ AnotherField : 'BWord'
5142+ } ,
5143+ {
5144+ Downloads : 127 ,
5145+ ID : 2 ,
5146+ ProductName : 'NetAdvantage' ,
5147+ ReleaseDate : null ,
5148+ Released : true ,
5149+ AnotherField : 'bWord'
5150+ } ,
5151+ {
5152+ Downloads : 20 ,
5153+ ID : 3 ,
5154+ ProductName : 'Ignite UI for Angular' ,
5155+ ReleaseDate : null ,
5156+ Released : null ,
5157+ AnotherField : 'aWord'
5158+ }
5159+ ] ;
5160+ fix . componentInstance . data = data ;
5161+ fix . detectChanges ( ) ;
5162+
5163+ // Open excel style custom filtering dialog.
5164+ GridFunctions . clickExcelFilterIcon ( fix , 'AnotherField' ) ;
5165+ tick ( 100 ) ;
5166+ fix . detectChanges ( ) ;
5167+
5168+ // Verify items order
5169+ verifyExcelStyleFilterAvailableOptions ( fix ,
5170+ [ 'Select All' , 'aWord' , 'BWord' ] ,
5171+ [ true , true , true ] ) ;
5172+ } ) ) ;
51385173 } ) ;
51395174
51405175 describe ( 'Templates: ' , ( ) => {
@@ -5600,7 +5635,6 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
56005635
56015636 tick ( 1050 ) ;
56025637 fix . detectChanges ( ) ;
5603-
56045638 } ) ) ;
56055639
56065640 it ( 'Done callback should be executed only once per column' , fakeAsync ( ( ) => {
@@ -6179,6 +6213,7 @@ function verifyExcelStyleFilterAvailableOptions(fix, labels: string[], checked:
61796213 const labelElements : any [ ] = Array . from ( GridFunctions . getExcelStyleSearchComponentListItems ( fix , excelMenu ) ) ;
61806214 const checkboxElements : any [ ] = Array . from ( GridFunctions . getExcelStyleFilteringCheckboxes ( fix , excelMenu ) ) ;
61816215
6216+ expect ( labelElements . length ) . toBe ( labels . length , 'incorrect rendered list items count' ) ;
61826217 expect ( labelElements . length ) . toBeGreaterThan ( 2 ) ;
61836218 expect ( checkboxElements . length ) . toBeGreaterThan ( 2 ) ;
61846219 labels . forEach ( ( l , index ) => {
0 commit comments