@@ -756,7 +756,7 @@ describe('Column Hiding UI #grid', () => {
756756 columnChooser . columnsAreaMaxHeight = '150px' ;
757757 fix . detectChanges ( ) ;
758758 const columnsAreaDiv = columnChooserElement . query ( By . css ( 'div.igx-column-hiding__columns' ) ) ;
759- expect ( JSON . stringify ( columnsAreaDiv . styles ) ) . toBe ( '{"max-height":" 150px"} ' ) ;
759+ expect ( getComputedStyle ( columnsAreaDiv . nativeElement ) . maxHeight ) . toBe ( '150px' ) ;
760760 expect ( columnChooserElement . nativeElement . offsetHeight <= 255 ) . toBe ( true ) ;
761761 } ) ;
762762
@@ -800,23 +800,21 @@ describe('Column Hiding UI #grid', () => {
800800
801801 it ( 'indents columns according to their level.' , ( ) => {
802802 const items = columnChooser . columnItems ;
803-
804803 expect ( items . filter ( ( col ) => col . calcIndent === 0 ) . length ) . toBe ( 3 ) ;
805804 expect ( items . filter ( ( col ) => col . calcIndent === 30 ) . length ) . toBe ( 2 ) ;
806805 expect ( items . filter ( ( col ) => col . calcIndent === 60 ) . length ) . toBe ( 2 ) ;
807806
808807 const columnItems = getColumnHidingItems ( ) ;
809-
810- const margin0 = '{"margin-left":"0px"}' ;
811- const margin1 = '{"margin-left":"30px"}' ;
812- const margin2 = '{"margin-left":"60px"}' ;
813- expect ( JSON . stringify ( columnItems [ 0 ] . styles ) ) . toBe ( margin0 ) ;
814- expect ( JSON . stringify ( columnItems [ 1 ] . styles ) ) . toBe ( margin0 ) ;
815- expect ( JSON . stringify ( columnItems [ 2 ] . styles ) ) . toBe ( margin1 ) ;
816- expect ( JSON . stringify ( columnItems [ 3 ] . styles ) ) . toBe ( margin1 ) ;
817- expect ( JSON . stringify ( columnItems [ 4 ] . styles ) ) . toBe ( margin2 ) ;
818- expect ( JSON . stringify ( columnItems [ 5 ] . styles ) ) . toBe ( margin2 ) ;
819- expect ( JSON . stringify ( columnItems [ 6 ] . styles ) ) . toBe ( margin0 ) ;
808+ const margin0 = '0px' ;
809+ const margin30 = '30px' ;
810+ const margin60 = '60px' ;
811+ expect ( getComputedStyle ( columnItems [ 0 ] . nativeElement ) . marginLeft ) . toBe ( margin0 ) ;
812+ expect ( getComputedStyle ( columnItems [ 1 ] . nativeElement ) . marginLeft ) . toBe ( margin0 ) ;
813+ expect ( getComputedStyle ( columnItems [ 2 ] . nativeElement ) . marginLeft ) . toBe ( margin30 ) ;
814+ expect ( getComputedStyle ( columnItems [ 3 ] . nativeElement ) . marginLeft ) . toBe ( margin30 ) ;
815+ expect ( getComputedStyle ( columnItems [ 4 ] . nativeElement ) . marginLeft ) . toBe ( margin60 ) ;
816+ expect ( getComputedStyle ( columnItems [ 5 ] . nativeElement ) . marginLeft ) . toBe ( margin60 ) ;
817+ expect ( getComputedStyle ( columnItems [ 6 ] . nativeElement ) . marginLeft ) . toBe ( margin0 ) ;
820818 } ) ;
821819
822820 it ( 'checks & hides all children when hiding their parent.' , fakeAsync ( ( ) => {
0 commit comments