@@ -5599,96 +5599,6 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
5599
5599
5600
5600
expect ( grid . filteredData ) . toBeNull ( ) ;
5601
5601
} ) ) ;
5602
-
5603
- it ( 'Move-left button is disabled when using it to pin a column and max pin area width is reached.' ,
5604
- fakeAsync ( ( ) => {
5605
- // Test prerequisites
5606
- grid . width = '500px' ;
5607
- fix . detectChanges ( ) ;
5608
- grid . getColumnByName ( 'ID' ) . filterable = true ;
5609
- grid . getColumnByName ( 'ID' ) . movable = true ;
5610
- grid . cdr . detectChanges ( ) ;
5611
- tick ( 100 ) ;
5612
-
5613
- // Pin columns until maximum pin area width is reached.
5614
- const columns = [ 'ProductName' , 'Downloads' , 'Released' ] ;
5615
- columns . forEach ( ( columnField ) => {
5616
- GridFunctions . clickExcelFilterIcon ( fix , columnField ) ;
5617
- fix . detectChanges ( ) ;
5618
- GridFunctions . clickPinIconInExcelStyleFiltering ( fix , false ) ;
5619
- tick ( 200 ) ;
5620
- fix . detectChanges ( ) ;
5621
- } ) ;
5622
-
5623
- // Verify pinned columns and 'ID' column position.
5624
- const column = grid . columns . find ( ( col ) => col . field === 'ID' ) ;
5625
- GridFunctions . verifyColumnIsPinned ( column , false , 3 ) ;
5626
- expect ( GridFunctions . getColumnHeaderByIndex ( fix , 3 ) . innerText ) . toBe ( 'ID' ) ;
5627
-
5628
- // Open ESF for the 'ID' column and verify that 'move left' button is disabled.
5629
- GridFunctions . clickExcelFilterIcon ( fix , 'ID' ) ;
5630
- fix . detectChanges ( ) ;
5631
- const moveComponent = GridFunctions . getExcelFilteringMoveComponent ( fix ) ;
5632
- const moveLeftButton = GridFunctions . sortNativeElementsHorizontally (
5633
- Array . from ( moveComponent . querySelectorAll ( '.igx-button--flat' ) ) ) [ 0 ] ;
5634
- expect ( moveLeftButton . classList . contains ( 'igx-button--disabled' ) ) . toBe ( true ) ;
5635
- } ) ) ;
5636
-
5637
- it ( 'Pin button is disabled when using it to pin a column and max pin area width is reached.' ,
5638
- fakeAsync ( ( ) => {
5639
- // Test prerequisites
5640
- grid . width = '500px' ;
5641
- fix . detectChanges ( ) ;
5642
- grid . getColumnByName ( 'ID' ) . filterable = true ;
5643
- grid . getColumnByName ( 'ID' ) . movable = true ;
5644
- grid . cdr . detectChanges ( ) ;
5645
- tick ( 100 ) ;
5646
-
5647
- // Pin columns until maximum pin area width is reached.
5648
- const columns = [ 'ProductName' , 'Downloads' , 'Released' ] ;
5649
- columns . forEach ( ( columnField ) => {
5650
- GridFunctions . clickExcelFilterIcon ( fix , columnField ) ;
5651
- fix . detectChanges ( ) ;
5652
- GridFunctions . clickPinIconInExcelStyleFiltering ( fix , false ) ;
5653
- tick ( 200 ) ;
5654
- fix . detectChanges ( ) ;
5655
- } ) ;
5656
-
5657
- // Verify pinned columns and 'ID' column position.
5658
- const column = grid . columns . find ( ( col ) => col . field === 'ID' ) ;
5659
- GridFunctions . verifyColumnIsPinned ( column , false , 3 ) ;
5660
- expect ( GridFunctions . getColumnHeaderByIndex ( fix , 3 ) . innerText ) . toBe ( 'ID' ) ;
5661
-
5662
- // Open ESF for the 'ID' column and verify that 'pin column' button is disabled.
5663
- GridFunctions . clickExcelFilterIcon ( fix , 'ID' ) ;
5664
- fix . detectChanges ( ) ;
5665
- let pinButton = GridFunctions . getExcelFilteringPinContainer ( fix ) ;
5666
- expect ( pinButton . classList . contains ( 'igx-excel-filter__actions-pin--disabled' ) ) . toBe ( true ,
5667
- 'pinButton should be disabled' ) ;
5668
-
5669
- // Close ESF.
5670
- GridFunctions . clickCancelExcelStyleFiltering ( fix ) ;
5671
- fix . detectChanges ( ) ;
5672
-
5673
- grid . displayDensity = DisplayDensity . compact ;
5674
- tick ( 200 ) ;
5675
- fix . detectChanges ( ) ;
5676
-
5677
- // Pin one more column, because there is enough space for one more in 'compact' density.
5678
- GridFunctions . clickExcelFilterIcon ( fix , 'ReleaseDate' ) ;
5679
- fix . detectChanges ( ) ;
5680
- GridFunctions . clickPinIconInExcelStyleFiltering ( fix , true ) ;
5681
- tick ( 200 ) ;
5682
- fix . detectChanges ( ) ;
5683
-
5684
- // Open ESF for the 'ID' column and verify that 'pin column' icon button is disabled.
5685
- GridFunctions . clickExcelFilterIcon ( fix , 'ID' ) ;
5686
- fix . detectChanges ( ) ;
5687
- const headerButtons = GridFunctions . getExcelFilteringHeaderIcons ( fix ) ;
5688
- pinButton = GridFunctions . sortNativeElementsHorizontally ( Array . from ( headerButtons ) ) [ 0 ] ;
5689
- expect ( pinButton . classList . contains ( 'igx-button--disabled' ) ) . toBe ( true ,
5690
- 'pinButton in header area should be disabled' ) ;
5691
- } ) ) ;
5692
5602
} ) ;
5693
5603
5694
5604
describe ( null , ( ) => {
@@ -5792,27 +5702,6 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
5792
5702
fix . detectChanges ( ) ;
5793
5703
} ) ) ;
5794
5704
5795
- it ( 'Should not pin column when its parent group cannot be pinned.' , fakeAsync ( ( ) => {
5796
- // Test prerequisites
5797
- grid . width = '1000px' ;
5798
- fix . detectChanges ( ) ;
5799
- tick ( 100 ) ;
5800
-
5801
- // Pin the 'AnotherField' column.
5802
- GridFunctions . clickExcelFilterIcon ( fix , 'AnotherField' ) ;
5803
- fix . detectChanges ( ) ;
5804
- GridFunctions . clickPinIconInExcelStyleFiltering ( fix , false ) ;
5805
- tick ( 200 ) ;
5806
- fix . detectChanges ( ) ;
5807
-
5808
- // Verify that the 'ProductName' pin button is disabled, because its parent column cannot be pinned.
5809
- GridFunctions . clickExcelFilterIcon ( fix , 'ProductName' ) ;
5810
- fix . detectChanges ( ) ;
5811
- const pinButton = GridFunctions . getExcelFilteringPinContainer ( fix ) ;
5812
- expect ( pinButton . classList . contains ( 'igx-excel-filter__actions-pin--disabled' ) ) . toBe ( true ,
5813
- 'pinButton should be disabled' ) ;
5814
- } ) ) ;
5815
-
5816
5705
it ( 'Should pin column next to already pinned group by moving it to the left.' , fakeAsync ( ( ) => {
5817
5706
// Test prerequisites
5818
5707
grid . width = '1000px' ;
0 commit comments