@@ -12,7 +12,6 @@ import { configureTestSuite } from '../../test-utils/configure-suite';
12
12
import { GridSelectionMode , ColumnDisplayOrder } from '../common/enums' ;
13
13
import { ControlsFunction } from '../../test-utils/controls-functions.spec' ;
14
14
import { IgxColumnActionsComponent } from '../column-actions/column-actions.component' ;
15
- import { IColumnVisibilityChangingEventArgs } from '../common/events' ;
16
15
17
16
describe ( 'Column Hiding UI #grid' , ( ) => {
18
17
configureTestSuite ( ) ;
@@ -148,7 +147,7 @@ describe('Column Hiding UI #grid', () => {
148
147
grid . columns [ 3 ] . disableHiding = undefined ;
149
148
fix . detectChanges ( ) ;
150
149
151
- verifyCheckbox ( 'Released' , true , false , columnChooserElement , fix ) ;
150
+ verifyCheckbox ( 'Released' , true , false , columnChooserElement ) ;
152
151
} ) ;
153
152
154
153
it ( 'onColumnToggled, onColumnVisibilityChanged, onColumnVisibilityChanging event is fired on toggling checkboxes.' , ( ) => {
@@ -201,7 +200,7 @@ describe('Column Hiding UI #grid', () => {
201
200
202
201
it ( '- toggling column checkbox checked state successfully changes the grid column visibility.' , ( ) => {
203
202
const checkbox = GridFunctions . getColumnChooserItemElement ( columnChooserElement , 'ReleaseDate' ) ;
204
- verifyCheckbox ( 'ReleaseDate' , true , false , columnChooserElement , fix ) ;
203
+ verifyCheckbox ( 'ReleaseDate' , true , false , columnChooserElement ) ;
205
204
206
205
const column = grid . getColumnByName ( 'ReleaseDate' ) ;
207
206
verifyColumnIsHidden ( column , false , 4 ) ;
@@ -222,25 +221,25 @@ describe('Column Hiding UI #grid', () => {
222
221
spyOn ( grid . columnVisibilityChanging , 'emit' ) ;
223
222
224
223
const name = 'ReleaseDate' ;
225
- verifyCheckbox ( name , true , false , columnChooserElement , fix ) ;
224
+ verifyCheckbox ( name , true , false , columnChooserElement ) ;
226
225
const column = grid . getColumnByName ( name ) ;
227
226
228
227
column . hidden = true ;
229
228
fix . detectChanges ( ) ;
230
229
231
- verifyCheckbox ( name , false , false , columnChooserElement , fix ) ;
230
+ verifyCheckbox ( name , false , false , columnChooserElement ) ;
232
231
verifyColumnIsHidden ( column , true , 3 ) ;
233
232
234
233
column . hidden = false ;
235
234
fix . detectChanges ( ) ;
236
235
237
- verifyCheckbox ( name , true , false , columnChooserElement , fix ) ;
236
+ verifyCheckbox ( name , true , false , columnChooserElement ) ;
238
237
verifyColumnIsHidden ( column , false , 4 ) ;
239
238
240
239
column . hidden = undefined ;
241
240
fix . detectChanges ( ) ;
242
241
243
- verifyCheckbox ( name , true , false , columnChooserElement , fix ) ;
242
+ verifyCheckbox ( name , true , false , columnChooserElement ) ;
244
243
verifyColumnIsHidden ( column , undefined , 4 ) ;
245
244
246
245
column . hidden = true ;
@@ -250,7 +249,7 @@ describe('Column Hiding UI #grid', () => {
250
249
column . hidden = null ;
251
250
fix . detectChanges ( ) ;
252
251
253
- verifyCheckbox ( name , true , false , columnChooserElement , fix ) ;
252
+ verifyCheckbox ( name , true , false , columnChooserElement ) ;
254
253
verifyColumnIsHidden ( column , null , 4 ) ;
255
254
expect ( grid . columnVisibilityChanging . emit ) . toHaveBeenCalledTimes ( 0 ) ;
256
255
expect ( grid . onColumnVisibilityChanged . emit ) . toHaveBeenCalledTimes ( 0 ) ;
@@ -265,7 +264,7 @@ describe('Column Hiding UI #grid', () => {
265
264
const hideAll = GridFunctions . getColumnChooserButton ( columnChooserElement , 'Hide All' ) . nativeElement ;
266
265
267
266
const checkbox = GridFunctions . getColumnChooserItemElement ( columnChooserElement , name ) ;
268
- verifyCheckbox ( name , false , false , columnChooserElement , fix ) ;
267
+ verifyCheckbox ( name , false , false , columnChooserElement ) ;
269
268
ControlsFunction . verifyButtonIsDisabled ( showAll , false ) ;
270
269
ControlsFunction . verifyButtonIsDisabled ( hideAll ) ;
271
270
@@ -294,7 +293,7 @@ describe('Column Hiding UI #grid', () => {
294
293
const hideAll = GridFunctions . getColumnChooserButton ( columnChooserElement , 'Hide All' ) . nativeElement ;
295
294
296
295
const checkbox = GridFunctions . getColumnChooserItemElement ( columnChooserElement , name ) ;
297
- verifyCheckbox ( name , true , false , columnChooserElement , fix ) ;
296
+ verifyCheckbox ( name , true , false , columnChooserElement ) ;
298
297
ControlsFunction . verifyButtonIsDisabled ( showAll ) ;
299
298
ControlsFunction . verifyButtonIsDisabled ( hideAll , false ) ;
300
299
@@ -722,16 +721,16 @@ describe('Column Hiding UI #grid', () => {
722
721
GridFunctions . clickColumnChooserItem ( columnChooserElement , 'Person Details' ) ;
723
722
fix . detectChanges ( ) ;
724
723
725
- verifyCheckbox ( 'Person Details' , false , false , columnChooserElement , fix ) ;
726
- verifyCheckbox ( 'ContactName' , false , false , columnChooserElement , fix ) ;
727
- verifyCheckbox ( 'ContactTitle' , false , false , columnChooserElement , fix ) ;
724
+ verifyCheckbox ( 'Person Details' , false , false , columnChooserElement ) ;
725
+ verifyCheckbox ( 'ContactName' , false , false , columnChooserElement ) ;
726
+ verifyCheckbox ( 'ContactTitle' , false , false , columnChooserElement ) ;
728
727
729
728
verifyColumnIsHidden ( grid . columns [ 3 ] , true , 4 ) ;
730
729
verifyColumnIsHidden ( grid . columns [ 4 ] , true , 4 ) ;
731
730
verifyColumnIsHidden ( grid . columns [ 5 ] , true , 4 ) ;
732
731
733
- verifyCheckbox ( 'CompanyName' , true , false , columnChooserElement , fix ) ;
734
- verifyCheckbox ( 'General Information' , true , false , columnChooserElement , fix ) ;
732
+ verifyCheckbox ( 'CompanyName' , true , false , columnChooserElement ) ;
733
+ verifyCheckbox ( 'General Information' , true , false , columnChooserElement ) ;
735
734
736
735
GridFunctions . clickColumnChooserItem ( columnChooserElement , 'Person Details' ) ;
737
736
fix . detectChanges ( ) ;
@@ -740,58 +739,58 @@ describe('Column Hiding UI #grid', () => {
740
739
verifyColumnIsHidden ( grid . columns [ 4 ] , false , 7 ) ;
741
740
verifyColumnIsHidden ( grid . columns [ 5 ] , false , 7 ) ;
742
741
743
- verifyCheckbox ( 'Person Details' , true , false , columnChooserElement , fix ) ;
744
- verifyCheckbox ( 'ContactName' , true , false , columnChooserElement , fix ) ;
745
- verifyCheckbox ( 'ContactTitle' , true , false , columnChooserElement , fix ) ;
742
+ verifyCheckbox ( 'Person Details' , true , false , columnChooserElement ) ;
743
+ verifyCheckbox ( 'ContactName' , true , false , columnChooserElement ) ;
744
+ verifyCheckbox ( 'ContactTitle' , true , false , columnChooserElement ) ;
746
745
747
- verifyCheckbox ( 'CompanyName' , true , false , columnChooserElement , fix ) ;
748
- verifyCheckbox ( 'General Information' , true , false , columnChooserElement , fix ) ;
746
+ verifyCheckbox ( 'CompanyName' , true , false , columnChooserElement ) ;
747
+ verifyCheckbox ( 'General Information' , true , false , columnChooserElement ) ;
749
748
} ) ;
750
749
751
750
it ( 'checks & hides all descendants when hiding top level parent.' , ( ) => {
752
751
GridFunctions . clickColumnChooserItem ( columnChooserElement , 'General Information' ) ;
753
752
fix . detectChanges ( ) ;
754
753
755
- verifyCheckbox ( 'General Information' , false , false , columnChooserElement , fix ) ;
756
- verifyCheckbox ( 'CompanyName' , false , false , columnChooserElement , fix ) ;
754
+ verifyCheckbox ( 'General Information' , false , false , columnChooserElement ) ;
755
+ verifyCheckbox ( 'CompanyName' , false , false , columnChooserElement ) ;
757
756
758
- verifyCheckbox ( 'Person Details' , false , false , columnChooserElement , fix ) ;
759
- verifyCheckbox ( 'ContactName' , false , false , columnChooserElement , fix ) ;
760
- verifyCheckbox ( 'ContactTitle' , false , false , columnChooserElement , fix ) ;
757
+ verifyCheckbox ( 'Person Details' , false , false , columnChooserElement ) ;
758
+ verifyCheckbox ( 'ContactName' , false , false , columnChooserElement ) ;
759
+ verifyCheckbox ( 'ContactTitle' , false , false , columnChooserElement ) ;
761
760
762
- verifyCheckbox ( 'Missing' , true , false , columnChooserElement , fix ) ;
763
- verifyCheckbox ( 'ID' , true , false , columnChooserElement , fix ) ;
761
+ verifyCheckbox ( 'Missing' , true , false , columnChooserElement ) ;
762
+ verifyCheckbox ( 'ID' , true , false , columnChooserElement ) ;
764
763
765
764
GridFunctions . clickColumnChooserItem ( columnChooserElement , 'General Information' ) ;
766
765
fix . detectChanges ( ) ;
767
766
768
- verifyCheckbox ( 'General Information' , true , false , columnChooserElement , fix ) ;
769
- verifyCheckbox ( 'CompanyName' , true , false , columnChooserElement , fix ) ;
767
+ verifyCheckbox ( 'General Information' , true , false , columnChooserElement ) ;
768
+ verifyCheckbox ( 'CompanyName' , true , false , columnChooserElement ) ;
770
769
771
- verifyCheckbox ( 'Person Details' , true , false , columnChooserElement , fix ) ;
772
- verifyCheckbox ( 'ContactName' , true , false , columnChooserElement , fix ) ;
773
- verifyCheckbox ( 'ContactTitle' , true , false , columnChooserElement , fix ) ;
770
+ verifyCheckbox ( 'Person Details' , true , false , columnChooserElement ) ;
771
+ verifyCheckbox ( 'ContactName' , true , false , columnChooserElement ) ;
772
+ verifyCheckbox ( 'ContactTitle' , true , false , columnChooserElement ) ;
774
773
} ) ;
775
774
776
775
it ( 'checks/unchecks parent when all children are checked/unchecked.' , ( ) => {
777
- verifyCheckbox ( 'Person Details' , true , false , columnChooserElement , fix ) ;
776
+ verifyCheckbox ( 'Person Details' , true , false , columnChooserElement ) ;
778
777
GridFunctions . clickColumnChooserItem ( columnChooserElement , 'ContactName' ) ;
779
778
fix . detectChanges ( ) ;
780
779
781
- verifyCheckbox ( 'Person Details' , true , false , columnChooserElement , fix ) ;
780
+ verifyCheckbox ( 'Person Details' , true , false , columnChooserElement ) ;
782
781
GridFunctions . clickColumnChooserItem ( columnChooserElement , 'ContactTitle' ) ;
783
782
fix . detectChanges ( ) ;
784
783
785
- verifyCheckbox ( 'Person Details' , false , false , columnChooserElement , fix ) ;
784
+ verifyCheckbox ( 'Person Details' , false , false , columnChooserElement ) ;
786
785
GridFunctions . clickColumnChooserItem ( columnChooserElement , 'ContactName' ) ;
787
786
fix . detectChanges ( ) ;
788
787
789
- verifyCheckbox ( 'Person Details' , true , false , columnChooserElement , fix ) ;
788
+ verifyCheckbox ( 'Person Details' , true , false , columnChooserElement ) ;
790
789
791
790
GridFunctions . clickColumnChooserItem ( columnChooserElement , 'ContactTitle' ) ;
792
791
fix . detectChanges ( ) ;
793
792
794
- verifyCheckbox ( 'Person Details' , true , false , columnChooserElement , fix ) ;
793
+ verifyCheckbox ( 'Person Details' , true , false , columnChooserElement ) ;
795
794
} ) ;
796
795
797
796
it ( 'filters group columns properly.' , ( ) => {
0 commit comments