@@ -1641,7 +1641,7 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
1641
1641
expect ( conditionChips . length ) . toBe ( 0 ) ;
1642
1642
} ) ) ;
1643
1643
1644
- it ( 'Should open/close filterRow for respective column when pressing \'ctrl + shift + l\' on its filterCell chip.' ,
1644
+ it ( 'Should open filterRow for respective column when pressing \'ctrl + shift + l\' on its filterCell chip.' ,
1645
1645
fakeAsync ( ( ) => {
1646
1646
// Verify filterRow is not opened.
1647
1647
expect ( fix . debugElement . query ( By . css ( FILTER_UI_ROW ) ) ) . toBeNull ( ) ;
@@ -1661,12 +1661,6 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
1661
1661
( hg ) => hg . nativeElement . classList . contains ( 'igx-grid__th--filtering' ) ) ;
1662
1662
expect ( headerGroupsFiltering . length ) . toBe ( 1 ) ;
1663
1663
expect ( headerGroupsFiltering [ 0 ] . componentInstance . column . field ) . toBe ( 'ReleaseDate' ) ;
1664
-
1665
- UIInteractions . triggerKeyDownEvtUponElem ( 'l' , releaseDateColumn . nativeElement , true , false , true , true ) ;
1666
- tick ( 200 ) ;
1667
- fix . detectChanges ( ) ;
1668
-
1669
- expect ( fix . debugElement . query ( By . css ( FILTER_UI_ROW ) ) ) . not . toBeNull ( ) ;
1670
1664
} ) ) ;
1671
1665
1672
1666
it ( 'Should navigate to first cell of grid when pressing \'Tab\' on the last filterCell chip.' , fakeAsync ( ( ) => {
@@ -4323,6 +4317,33 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
4323
4317
expect ( excelMenu ) . toBeNull ( ) ;
4324
4318
} ) ) ;
4325
4319
4320
+ it ( 'Should open/close filterRow for respective column when pressing \'ctrl + shift + l\' on its filterCell chip.' ,
4321
+ fakeAsync ( ( ) => {
4322
+ let excelMenu = GridFunctions . getExcelStyleFilteringComponent ( fix ) ;
4323
+ // Verify ESF is not visible.
4324
+ expect ( excelMenu ) . toBeNull ( ) ;
4325
+
4326
+ const downloadsColumn = GridFunctions . getColumnHeader ( 'Downloads' , fix ) ;
4327
+ UIInteractions . simulateClickAndSelectEvent ( downloadsColumn ) ;
4328
+ fix . detectChanges ( ) ;
4329
+
4330
+ UIInteractions . triggerKeyDownEvtUponElem ( 'l' , downloadsColumn . nativeElement , true , false , true , true ) ;
4331
+ tick ( 200 ) ;
4332
+ fix . detectChanges ( ) ;
4333
+
4334
+ // Verify ESF menu is opened for the 'Downloads' column.
4335
+ excelMenu = GridFunctions . getExcelStyleFilteringComponent ( fix ) ;
4336
+ expect ( excelMenu ) . not . toBeNull ( ) ;
4337
+
4338
+ // Press the combination again.
4339
+ UIInteractions . triggerKeyDownEvtUponElem ( 'l' , excelMenu , true , false , true , true ) ;
4340
+ tick ( 200 ) ;
4341
+ fix . detectChanges ( ) ;
4342
+
4343
+ excelMenu = GridFunctions . getExcelStyleFilteringComponent ( fix ) ;
4344
+ expect ( excelMenu ) . toBeNull ( ) ;
4345
+ } ) ) ;
4346
+
4326
4347
it ( 'Should filter date by input string' , fakeAsync ( ( ) => {
4327
4348
GridFunctions . clickExcelFilterIcon ( fix , 'ReleaseDate' ) ;
4328
4349
tick ( 100 ) ;
@@ -4444,71 +4465,81 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
4444
4465
} ) ) ;
4445
4466
4446
4467
it ( 'Should add list items to current filtered items when "Add to current filter selection" is selected.' , fakeAsync ( ( ) => {
4447
- const totalListItems = [ ] ;
4468
+ const totalListItems = [ ] ;
4448
4469
4449
- // Open excel style custom filtering dialog.
4450
- GridFunctions . clickExcelFilterIconFromCode ( fix , grid , 'Downloads' ) ;
4470
+ // Open excel style custom filtering dialog.
4471
+ GridFunctions . clickExcelFilterIconFromCode ( fix , grid , 'Downloads' ) ;
4451
4472
4452
- // Type string in search box.
4453
- let searchComponent = GridFunctions . getExcelStyleSearchComponent ( fix ) ;
4454
- let inputNativeElement = GridFunctions . getExcelStyleSearchComponentInput ( fix , searchComponent ) ;
4455
- UIInteractions . clickAndSendInputElementValue ( inputNativeElement , '5' , fix ) ;
4456
- tick ( 100 ) ;
4457
- fix . detectChanges ( ) ;
4473
+ // Type string in search box.
4474
+ let searchComponent = GridFunctions . getExcelStyleSearchComponent ( fix ) ;
4475
+ let inputNativeElement = GridFunctions . getExcelStyleSearchComponentInput ( fix , searchComponent ) ;
4476
+ UIInteractions . clickAndSendInputElementValue ( inputNativeElement , '5' , fix ) ;
4477
+ tick ( 100 ) ;
4478
+ fix . detectChanges ( ) ;
4479
+
4480
+ let listItems = GridFunctions . getExcelStyleSearchComponentListItems ( fix , searchComponent )
4481
+ . splice ( 2 )
4482
+ . map ( c => c . innerText ) ;
4458
4483
4459
- let listItems = GridFunctions . getExcelStyleSearchComponentListItems ( fix , searchComponent )
4460
- . splice ( 2 )
4461
- . map ( c => c . innerText ) ;
4484
+ listItems . forEach ( c => totalListItems . push ( c ) ) ;
4462
4485
4463
- listItems . forEach ( c => totalListItems . push ( c ) ) ;
4486
+ // Click 'apply' button to apply filter.
4487
+ GridFunctions . clickApplyExcelStyleFiltering ( fix ) ;
4488
+ tick ( 100 ) ;
4489
+ fix . detectChanges ( ) ;
4464
4490
4465
- // Click 'apply' button to apply filter.
4466
- GridFunctions . clickApplyExcelStyleFiltering ( fix ) ;
4467
- tick ( 100 ) ;
4468
- fix . detectChanges ( ) ;
4491
+ // Get the results and verify that they match the list items.
4492
+ let gridCellValues = GridFunctions . getColumnCells ( fix , 'Downloads' )
4493
+ . map ( c => c . nativeElement . innerText ) ;
4469
4494
4470
- // Get the results and verify that they match the list items.
4471
- let gridCellValues = GridFunctions . getColumnCells ( fix , 'Downloads' )
4472
- . map ( c => c . nativeElement . innerText ) ;
4495
+ expect ( gridCellValues . length ) . toEqual ( 1 ) ;
4496
+ expect ( gridCellValues ) . toEqual ( totalListItems ) ;
4473
4497
4474
- expect ( gridCellValues . length ) . toEqual ( 1 ) ;
4475
- expect ( gridCellValues ) . toEqual ( totalListItems ) ;
4498
+ // Open excel style custom filtering dialog again.
4499
+ GridFunctions . clickExcelFilterIconFromCode ( fix , grid , 'Downloads' ) ;
4476
4500
4477
- // Open excel style custom filtering dialog again.
4478
- GridFunctions . clickExcelFilterIconFromCode ( fix , grid , 'Downloads' ) ;
4501
+ // Type string in search box.
4502
+ searchComponent = GridFunctions . getExcelStyleSearchComponent ( fix ) ;
4503
+ inputNativeElement = GridFunctions . getExcelStyleSearchComponentInput ( fix , searchComponent ) ;
4504
+ UIInteractions . clickAndSendInputElementValue ( inputNativeElement , '7' , fix ) ;
4505
+ tick ( 100 ) ;
4506
+ fix . detectChanges ( ) ;
4479
4507
4480
- // Type string in search box.
4481
- searchComponent = GridFunctions . getExcelStyleSearchComponent ( fix ) ;
4482
- inputNativeElement = GridFunctions . getExcelStyleSearchComponentInput ( fix , searchComponent ) ;
4483
- UIInteractions . clickAndSendInputElementValue ( inputNativeElement , '7' , fix ) ;
4484
- tick ( 100 ) ;
4485
- fix . detectChanges ( ) ;
4508
+ listItems = GridFunctions . getExcelStyleSearchComponentListItems ( fix , searchComponent )
4509
+ . splice ( 2 )
4510
+ . map ( c => c . innerText ) ;
4486
4511
4487
- listItems = GridFunctions . getExcelStyleSearchComponentListItems ( fix , searchComponent )
4488
- . splice ( 2 )
4489
- . map ( c => c . innerText ) ;
4512
+ listItems . forEach ( c => totalListItems . push ( c ) ) ;
4513
+ totalListItems . sort ( ) ;
4490
4514
4491
- listItems . forEach ( c => totalListItems . push ( c ) ) ;
4492
- totalListItems . sort ( ) ;
4515
+ // Select 'Add to current filter selection'.
4516
+ const checkbox = GridFunctions . getExcelStyleFilteringCheckboxes ( fix ) ;
4517
+ checkbox [ 1 ] . click ( ) ;
4518
+ tick ( ) ;
4519
+ fix . detectChanges ( ) ;
4493
4520
4494
- // Select 'Add to current filter selection'.
4495
- const checkbox = GridFunctions . getExcelStyleFilteringCheckboxes ( fix ) ;
4496
- checkbox [ 1 ] . click ( ) ;
4497
- tick ( ) ;
4498
- fix . detectChanges ( ) ;
4521
+ // Click 'apply' button to apply filter.
4522
+ GridFunctions . clickApplyExcelStyleFiltering ( fix ) ;
4523
+ tick ( 100 ) ;
4524
+ fix . detectChanges ( ) ;
4499
4525
4500
- // Click 'apply' button to apply filter .
4501
- GridFunctions . clickApplyExcelStyleFiltering ( fix ) ;
4502
- tick ( 100 ) ;
4503
- fix . detectChanges ( ) ;
4526
+ // Get the results and verify that they match the list items .
4527
+ gridCellValues = GridFunctions . getColumnCells ( fix , 'Downloads' )
4528
+ . map ( c => c . nativeElement . innerText )
4529
+ . sort ( ) ;
4504
4530
4505
- // Get the results and verify that they match the list items.
4506
- gridCellValues = GridFunctions . getColumnCells ( fix , 'Downloads' )
4507
- . map ( c => c . nativeElement . innerText )
4508
- . sort ( ) ;
4531
+ expect ( gridCellValues . length ) . toEqual ( 3 ) ;
4532
+ expect ( gridCellValues ) . toEqual ( totalListItems ) ;
4533
+
4534
+ // Open excel style custom filtering dialog again.
4535
+ GridFunctions . clickExcelFilterIconFromCode ( fix , grid , 'Downloads' ) ;
4536
+
4537
+ // Get checkboxes and verify 'Select All' is indeterminate.
4538
+ const excelMenu = GridFunctions . getExcelStyleFilteringComponent ( fix ) ;
4539
+ const checkboxes : any [ ] = Array . from ( GridFunctions . getExcelStyleFilteringCheckboxes ( fix , excelMenu ) ) ;
4540
+ fix . detectChanges ( ) ;
4509
4541
4510
- expect ( gridCellValues . length ) . toEqual ( 3 ) ;
4511
- expect ( gridCellValues ) . toEqual ( totalListItems ) ;
4542
+ expect ( checkboxes [ 0 ] . indeterminate ) . toBeTrue ( ) ;
4512
4543
} ) ) ;
4513
4544
4514
4545
it ( 'Should commit and close ESF on pressing \'Enter\'' , fakeAsync ( ( ) => {
0 commit comments