@@ -21,7 +21,6 @@ import { IgxStringFilteringOperand, IgxNumberFilteringOperand } from '../../data
2121import { SortingDirection , ISortingExpression } from '../../data-operations/sorting-expression.interface' ;
2222import { configureTestSuite } from '../../test-utils/configure-suite' ;
2323import { IgxTabsModule , IgxTabsComponent } from '../../tabs' ;
24- import { resizeObserverIgnoreError } from '../../test-utils/helper-utils.spec' ;
2524import { GridSelectionMode } from '../common/enums' ;
2625
2726
@@ -979,7 +978,7 @@ describe('IgxGrid Component Tests #grid', () => {
979978 fix . componentInstance . data = fix . componentInstance . fullData ;
980979 fix . detectChanges ( ) ;
981980 const defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
982- expect ( defaultHeight ) . not . toBeNull ( ) ;
981+ expect ( defaultHeight ) . not . toBeFalsy ( ) ;
983982 expect ( parseInt ( defaultHeight , 10 ) ) . toBeGreaterThan ( 400 ) ;
984983 expect ( fix . componentInstance . isVerticalScrollbarVisible ( ) ) . toBeTruthy ( ) ;
985984 expect ( fix . componentInstance . grid . rowList . length ) . toBeGreaterThanOrEqual ( 10 ) ;
@@ -993,7 +992,7 @@ describe('IgxGrid Component Tests #grid', () => {
993992 fix . detectChanges ( ) ;
994993
995994 const defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
996- expect ( defaultHeight ) . not . toBeNull ( ) ;
995+ expect ( defaultHeight ) . not . toBeFalsy ( ) ;
997996 expect ( parseInt ( defaultHeight , 10 ) ) . toBeGreaterThan ( 400 ) ;
998997 expect ( fix . componentInstance . isVerticalScrollbarVisible ( ) ) . toBeTruthy ( ) ;
999998 expect ( fix . componentInstance . grid . rowList . length ) . toBeGreaterThanOrEqual ( 10 ) ;
@@ -1007,7 +1006,7 @@ describe('IgxGrid Component Tests #grid', () => {
10071006 fix . detectChanges ( ) ;
10081007 tick ( 16 ) ;
10091008 const defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
1010- expect ( defaultHeight ) . toBeNull ( ) ;
1009+ expect ( defaultHeight ) . toBeFalsy ( ) ;
10111010 expect ( fix . debugElement . query ( By . css ( TBODY_CLASS ) )
10121011 . nativeElement . getBoundingClientRect ( ) . height ) . toBeGreaterThan ( 200 ) ;
10131012 expect ( fix . componentInstance . isVerticalScrollbarVisible ( ) ) . toBeFalsy ( ) ;
@@ -1030,7 +1029,7 @@ describe('IgxGrid Component Tests #grid', () => {
10301029
10311030 const defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
10321031 const defaultHeightNum = parseInt ( defaultHeight , 10 ) ;
1033- expect ( defaultHeight ) . not . toBeNull ( ) ;
1032+ expect ( defaultHeight ) . not . toBeFalsy ( ) ;
10341033 expect ( defaultHeightNum ) . toBe ( 330 ) ;
10351034 expect ( fix . componentInstance . isVerticalScrollbarVisible ( ) ) . toBeTruthy ( ) ;
10361035 expect ( fix . componentInstance . grid . rowList . length ) . toEqual ( 11 ) ;
@@ -1066,14 +1065,14 @@ describe('IgxGrid Component Tests #grid', () => {
10661065 tick ( ) ;
10671066 fix . detectChanges ( ) ;
10681067 let defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
1069- expect ( defaultHeight ) . toBeNull ( ) ; // initially body height is null in auto-sizing scenarios with empty data
1068+ expect ( defaultHeight ) . toBeFalsy ( ) ; // initially body height is null in auto-sizing scenarios with empty data
10701069 expect ( fix . componentInstance . grid . calcHeight ) . toBeNull ( ) ;
10711070 fix . componentInstance . data = fix . componentInstance . fullData ;
10721071 tick ( ) ;
10731072 fix . detectChanges ( ) ;
10741073 defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
10751074 const defaultHeightNum = parseInt ( defaultHeight , 10 ) ;
1076- expect ( defaultHeight ) . not . toBeNull ( ) ;
1075+ expect ( defaultHeight ) . not . toBeFalsy ( ) ;
10771076 expect ( defaultHeightNum ) . toBe ( 510 ) ;
10781077 expect ( fix . componentInstance . grid . calcHeight ) . toBe ( 510 ) ;
10791078 } ) ) ;
@@ -1083,15 +1082,15 @@ describe('IgxGrid Component Tests #grid', () => {
10831082 fix . detectChanges ( ) ;
10841083
10851084 let defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
1086- expect ( defaultHeight ) . toBeNull ( ) ; // initially body height is null in auto-sizing scenarios with empty data
1085+ expect ( defaultHeight ) . toBeFalsy ( ) ; // initially body height is null in auto-sizing scenarios with empty data
10871086 expect ( fix . componentInstance . grid . calcHeight ) . toBeNull ( ) ;
10881087
10891088 fix . componentInstance . data = fix . componentInstance . fullData ;
10901089 fix . detectChanges ( ) ;
10911090
10921091 defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
10931092 const defaultHeightNum = parseInt ( defaultHeight , 10 ) ;
1094- expect ( defaultHeight ) . not . toBeNull ( ) ;
1093+ expect ( defaultHeight ) . not . toBeFalsy ( ) ;
10951094 expect ( defaultHeightNum ) . toBe ( 510 ) ;
10961095 expect ( fix . componentInstance . grid . calcHeight ) . toBe ( 510 ) ;
10971096 } ) ) ;
@@ -1102,15 +1101,15 @@ describe('IgxGrid Component Tests #grid', () => {
11021101 fix . detectChanges ( ) ;
11031102
11041103 let defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
1105- expect ( defaultHeight ) . toBeNull ( ) ; // initially body height is null in auto-sizing scenarios with empty data
1104+ expect ( defaultHeight ) . toBeFalsy ( ) ; // initially body height is null in auto-sizing scenarios with empty data
11061105 expect ( fix . componentInstance . grid . calcHeight ) . toBeNull ( ) ;
11071106
11081107 fix . componentInstance . data = Array . from ( { length : 100000 } , ( _ , i ) => ( { 'ID' : i , 'CompanyName' : 'CN' + i } ) ) ;
11091108 fix . detectChanges ( ) ;
11101109
11111110 defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
11121111 const defaultHeightNum = parseInt ( defaultHeight , 10 ) ;
1113- expect ( defaultHeight ) . not . toBeNull ( ) ;
1112+ expect ( defaultHeight ) . not . toBeFalsy ( ) ;
11141113 expect ( defaultHeightNum ) . toBe ( 510 ) ;
11151114 expect ( fix . componentInstance . grid . calcHeight ) . toBe ( 510 ) ;
11161115 } ) ;
@@ -1121,14 +1120,15 @@ describe('IgxGrid Component Tests #grid', () => {
11211120 fix . detectChanges ( ) ;
11221121
11231122 let defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
1124- expect ( defaultHeight ) . toBeNull ( ) ;
1123+ expect ( defaultHeight ) . toBeFalsy ( ) ;
11251124 expect ( fix . componentInstance . grid . calcHeight ) . toBeNull ( ) ;
11261125 fix . componentInstance . data = fix . componentInstance . fullData ;
1126+ fix . componentInstance . cdr . detectChanges ( ) ;
11271127 fix . detectChanges ( ) ;
11281128
11291129 defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
11301130 const defaultHeightNum = parseInt ( defaultHeight , 10 ) ;
1131- expect ( defaultHeight ) . not . toBeNull ( ) ;
1131+ expect ( defaultHeight ) . not . toBeFalsy ( ) ;
11321132 expect ( defaultHeightNum ) . toBe ( 510 ) ;
11331133 expect ( fix . componentInstance . grid . calcHeight ) . toBe ( 510 ) ;
11341134 } ) ;
@@ -1139,14 +1139,14 @@ describe('IgxGrid Component Tests #grid', () => {
11391139 fix . componentInstance . data = fix . componentInstance . semiData ;
11401140 fix . detectChanges ( ) ;
11411141 let defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
1142- expect ( defaultHeight ) . toBeNull ( ) ;
1142+ expect ( defaultHeight ) . toBeFalsy ( ) ;
11431143 expect ( fix . componentInstance . grid . calcHeight ) . toBeNull ( ) ;
11441144 fix . componentInstance . data = Array . from ( { length : 100000 } , ( _ , i ) => ( { 'ID' : i , 'CompanyName' : 'CN' + i } ) ) ;
11451145 fix . detectChanges ( ) ;
11461146 await wait ( 500 ) ;
11471147 defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
11481148 const defaultHeightNum = parseInt ( defaultHeight , 10 ) ;
1149- expect ( defaultHeight ) . not . toBeNull ( ) ;
1149+ expect ( defaultHeight ) . not . toBeFalsy ( ) ;
11501150 expect ( defaultHeightNum ) . toBe ( 510 ) ;
11511151 expect ( fix . componentInstance . grid . calcHeight ) . toBe ( 510 ) ;
11521152 } ) ;
@@ -1156,22 +1156,22 @@ describe('IgxGrid Component Tests #grid', () => {
11561156 tick ( ) ;
11571157 fix . detectChanges ( ) ;
11581158 let defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
1159- expect ( defaultHeight ) . toBeNull ( ) ; // initially body height is null in auto-sizing scenarios with empty data
1159+ expect ( defaultHeight ) . toBeFalsy ( ) ; // initially body height is null in auto-sizing scenarios with empty data
11601160 expect ( fix . componentInstance . grid . calcHeight ) . toBeNull ( ) ;
11611161 fix . componentInstance . data = fix . componentInstance . fullData ;
11621162 tick ( ) ;
11631163 fix . detectChanges ( ) ;
11641164 defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
11651165 let defaultHeightNum = parseInt ( defaultHeight , 10 ) ;
1166- expect ( defaultHeight ) . not . toBeNull ( ) ;
1166+ expect ( defaultHeight ) . not . toBeFalsy ( ) ;
11671167 expect ( defaultHeightNum ) . toBe ( 510 ) ;
11681168 expect ( fix . componentInstance . grid . calcHeight ) . toBe ( 510 ) ;
11691169 fix . componentInstance . grid . filter ( 'ID' , 'ALFKI' , IgxStringFilteringOperand . instance ( ) . condition ( 'equals' ) ) ;
11701170 tick ( ) ;
11711171 fix . detectChanges ( ) ;
11721172 defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
11731173 defaultHeightNum = parseInt ( defaultHeight , 10 ) ;
1174- expect ( defaultHeight ) . not . toBeNull ( ) ;
1174+ expect ( defaultHeight ) . not . toBeFalsy ( ) ;
11751175 expect ( defaultHeightNum ) . toBe ( 510 ) ;
11761176 expect ( fix . componentInstance . grid . calcHeight ) . toBe ( 510 ) ;
11771177 } ) ) ;
@@ -1181,15 +1181,15 @@ describe('IgxGrid Component Tests #grid', () => {
11811181 fix . detectChanges ( ) ;
11821182
11831183 let defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
1184- expect ( defaultHeight ) . toBeNull ( ) ; // initially body height is null in auto-sizing scenarios with empty data
1184+ expect ( defaultHeight ) . toBeFalsy ( ) ; // initially body height is null in auto-sizing scenarios with empty data
11851185 expect ( fix . componentInstance . grid . calcHeight ) . toBeNull ( ) ;
11861186
11871187 fix . componentInstance . data = fix . componentInstance . fullData ;
11881188 fix . detectChanges ( ) ;
11891189
11901190 defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
11911191 const defaultHeightNum = parseInt ( defaultHeight , 10 ) ;
1192- expect ( defaultHeight ) . not . toBeNull ( ) ;
1192+ expect ( defaultHeight ) . not . toBeFalsy ( ) ;
11931193 expect ( defaultHeightNum ) . toBe ( 510 ) ;
11941194 expect ( fix . componentInstance . grid . calcHeight ) . toBe ( 510 ) ;
11951195
@@ -1199,7 +1199,7 @@ describe('IgxGrid Component Tests #grid', () => {
11991199 fix . detectChanges ( ) ;
12001200
12011201 defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
1202- expect ( defaultHeight ) . toBeNull ( ) ;
1202+ expect ( defaultHeight ) . toBeFalsy ( ) ;
12031203 expect ( fix . componentInstance . grid . calcHeight ) . toBeNull ( ) ;
12041204 } ) ;
12051205
@@ -1208,15 +1208,15 @@ describe('IgxGrid Component Tests #grid', () => {
12081208 fix . detectChanges ( ) ;
12091209
12101210 let defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
1211- expect ( defaultHeight ) . toBeNull ( ) ; // initially body height is null in auto-sizing scenarios with empty data
1211+ expect ( defaultHeight ) . toBeFalsy ( ) ; // initially body height is null in auto-sizing scenarios with empty data
12121212 expect ( fix . componentInstance . grid . calcHeight ) . toBeNull ( ) ;
12131213
12141214 fix . componentInstance . data = fix . componentInstance . fullData ;
12151215 fix . detectChanges ( ) ;
12161216
12171217 defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
12181218 let defaultHeightNum = parseInt ( defaultHeight , 10 ) ;
1219- expect ( defaultHeight ) . not . toBeNull ( ) ;
1219+ expect ( defaultHeight ) . not . toBeFalsy ( ) ;
12201220 expect ( defaultHeightNum ) . toBe ( 510 ) ;
12211221 expect ( fix . componentInstance . grid . calcHeight ) . toBe ( 510 ) ;
12221222
@@ -1225,7 +1225,7 @@ describe('IgxGrid Component Tests #grid', () => {
12251225
12261226 defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
12271227 defaultHeightNum = parseInt ( defaultHeight , 10 ) ;
1228- expect ( defaultHeight ) . not . toBeNull ( ) ;
1228+ expect ( defaultHeight ) . not . toBeFalsy ( ) ;
12291229 expect ( defaultHeightNum ) . toBeLessThan ( 400 ) ;
12301230 expect ( defaultHeightNum ) . toBeGreaterThan ( 300 ) ;
12311231 expect ( fix . componentInstance . grid . calcHeight ) . toBeLessThan ( 400 ) ;
@@ -1239,7 +1239,7 @@ describe('IgxGrid Component Tests #grid', () => {
12391239 fix . detectChanges ( ) ;
12401240 let defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
12411241 let defaultHeightNum = parseInt ( defaultHeight , 10 ) ;
1242- expect ( defaultHeight ) . not . toBeNull ( ) ;
1242+ expect ( defaultHeight ) . not . toBeFalsy ( ) ;
12431243 expect ( defaultHeightNum ) . toBeLessThan ( 800 ) ;
12441244 expect ( defaultHeightNum ) . toBeGreaterThan ( 700 ) ;
12451245 expect ( fix . componentInstance . grid . calcHeight ) . toBeLessThan ( 800 ) ;
@@ -1249,7 +1249,7 @@ describe('IgxGrid Component Tests #grid', () => {
12491249 fix . detectChanges ( ) ;
12501250 defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
12511251 defaultHeightNum = parseInt ( defaultHeight , 10 ) ;
1252- expect ( defaultHeight ) . not . toBeNull ( ) ;
1252+ expect ( defaultHeight ) . not . toBeFalsy ( ) ;
12531253 expect ( defaultHeightNum ) . toBeLessThan ( 800 ) ;
12541254 expect ( defaultHeightNum ) . toBeGreaterThan ( 700 ) ;
12551255 expect ( fix . componentInstance . grid . calcHeight ) . toBeLessThan ( 800 ) ;
@@ -1960,6 +1960,8 @@ export class IgxGridTestComponent {
19601960
19611961 public columnEventCount = 0 ;
19621962
1963+ constructor ( public cdr : ChangeDetectorRef ) { }
1964+
19631965 public columnCreated ( column : IgxColumnComponent ) {
19641966 this . columnEventCount ++ ;
19651967 column . filterable = true ;
0 commit comments