@@ -17,13 +17,12 @@ import {
1717 Pipe ,
1818 PipeTransform
1919} from '@angular/core' ;
20- import { TestBed , ComponentFixture } from '@angular/core/testing' ;
20+ import { TestBed , ComponentFixture , waitForAsync } from '@angular/core/testing' ;
2121import { By } from '@angular/platform-browser' ;
2222import { BehaviorSubject , Observable } from 'rxjs' ;
2323import { IForOfState , IgxForOfDirective } from './for_of.directive' ;
2424import { UIInteractions , wait } from '../../test-utils/ui-interactions.spec' ;
2525
26- import { configureTestSuite } from '../../test-utils/configure-suite' ;
2726import { IgxForOfScrollSyncService } from './for_of.sync.service' ;
2827import { PlatformUtil } from '../../core/utils' ;
2928
@@ -42,10 +41,10 @@ describe('IgxForOf directive -', () => {
4241 } ) ;
4342
4443 describe ( 'empty virtual component' , ( ) => {
45- configureTestSuite ( ( ( ) => {
44+ beforeEach ( waitForAsync ( ( ) => {
4645 return TestBed . configureTestingModule ( {
4746 imports : [ EmptyVirtualComponent ]
48- } ) ;
47+ } ) . compileComponents ( ) ;
4948 } ) ) ;
5049
5150 it ( 'should initialize empty directive' , ( ) => {
@@ -59,10 +58,10 @@ describe('IgxForOf directive -', () => {
5958 describe ( 'horizontal virtual component' , ( ) => {
6059 let fix : ComponentFixture < HorizontalVirtualComponent > ;
6160
62- configureTestSuite ( ( ( ) => {
61+ beforeEach ( waitForAsync ( ( ) => {
6362 return TestBed . configureTestingModule ( {
6463 imports : [ HorizontalVirtualComponent ]
65- } ) ;
64+ } ) . compileComponents ( ) ;
6665 } ) ) ;
6766
6867 beforeEach ( ( ) => {
@@ -222,10 +221,12 @@ describe('IgxForOf directive -', () => {
222221
223222 describe ( 'vertical virtual component' , ( ) => {
224223 let fix : ComponentFixture < VerticalVirtualComponent > ;
225- configureTestSuite ( ( ( ) => {
226- return TestBed . configureTestingModule ( {
227- imports : [ VerticalVirtualNoDataComponent , VerticalVirtualComponent ]
228- } ) ;
224+ beforeEach ( waitForAsync ( ( ) => {
225+ TestBed . configureTestingModule ( {
226+ imports : [
227+ VerticalVirtualNoDataComponent , VerticalVirtualComponent
228+ ]
229+ } ) . compileComponents ( ) ;
229230 } ) ) ;
230231
231232 beforeEach ( ( ) => {
@@ -386,10 +387,12 @@ describe('IgxForOf directive -', () => {
386387
387388 describe ( 'vertical virtual component no data' , ( ) => {
388389 let fix : ComponentFixture < VerticalVirtualComponent > ;
389- configureTestSuite ( ( ( ) => {
390- return TestBed . configureTestingModule ( {
391- imports : [ VerticalVirtualNoDataComponent , VerticalVirtualComponent ]
392- } ) ;
390+ beforeEach ( waitForAsync ( ( ) => {
391+ TestBed . configureTestingModule ( {
392+ imports : [
393+ VerticalVirtualNoDataComponent , VerticalVirtualComponent
394+ ]
395+ } ) . compileComponents ( ) ;
393396 } ) ) ;
394397
395398 beforeEach ( ( ) => {
@@ -422,10 +425,12 @@ describe('IgxForOf directive -', () => {
422425 describe ( 'vertical and horizontal virtual component' , ( ) => {
423426 let fix : ComponentFixture < VirtualComponent > ;
424427
425- configureTestSuite ( ( ( ) => {
426- return TestBed . configureTestingModule ( {
427- imports : [ VirtualComponent ]
428- } ) ;
428+ beforeEach ( waitForAsync ( ( ) => {
429+ TestBed . configureTestingModule ( {
430+ imports : [
431+ VirtualComponent
432+ ]
433+ } ) . compileComponents ( ) ;
429434 } ) ) ;
430435
431436 beforeEach ( ( ) => {
@@ -1002,10 +1007,12 @@ describe('IgxForOf directive -', () => {
10021007 } ) ;
10031008
10041009 describe ( 'variable size component' , ( ) => {
1005- configureTestSuite ( ( ( ) => {
1006- return TestBed . configureTestingModule ( {
1007- imports : [ VirtualVariableSizeComponent ]
1008- } ) ;
1010+ beforeEach ( waitForAsync ( ( ) => {
1011+ TestBed . configureTestingModule ( {
1012+ imports : [
1013+ VirtualVariableSizeComponent
1014+ ]
1015+ } ) . compileComponents ( ) ;
10091016 } ) ) ;
10101017
10111018 it ( 'should update display container classes when content state changes from virtualized to non-virtualized.' , ( ) => {
@@ -1043,10 +1050,12 @@ describe('IgxForOf directive -', () => {
10431050 } ) ;
10441051
10451052 describe ( 'remote virtual component' , ( ) => {
1046- configureTestSuite ( ( ( ) => {
1047- return TestBed . configureTestingModule ( {
1048- imports : [ RemoteVirtualizationComponent ]
1049- } ) ;
1053+ beforeEach ( waitForAsync ( ( ) => {
1054+ TestBed . configureTestingModule ( {
1055+ imports : [
1056+ RemoteVirtualizationComponent
1057+ ]
1058+ } ) . compileComponents ( ) ;
10501059 } ) ) ;
10511060
10521061 it ( 'should allow remote virtualization' , async ( ) => {
@@ -1080,10 +1089,12 @@ describe('IgxForOf directive -', () => {
10801089 } ) ;
10811090
10821091 describe ( 'remote virtual component with specified igxForTotalItemCount' , ( ) => {
1083- configureTestSuite ( ( ( ) => {
1084- return TestBed . configureTestingModule ( {
1085- imports : [ RemoteVirtCountComponent ]
1086- } ) ;
1092+ beforeEach ( waitForAsync ( ( ) => {
1093+ TestBed . configureTestingModule ( {
1094+ imports : [
1095+ RemoteVirtCountComponent
1096+ ]
1097+ } ) . compileComponents ( ) ;
10871098 } ) ) ;
10881099
10891100 it ( 'should apply remote virtualization correctly' , async ( ) => {
@@ -1117,10 +1128,12 @@ describe('IgxForOf directive -', () => {
11171128 } ) ;
11181129
11191130 describe ( 'no width and height component' , ( ) => {
1120- configureTestSuite ( ( ( ) => {
1121- return TestBed . configureTestingModule ( {
1122- imports : [ NoWidthAndHeightComponent ]
1123- } ) ;
1131+ beforeEach ( waitForAsync ( ( ) => {
1132+ TestBed . configureTestingModule ( {
1133+ imports : [
1134+ NoWidthAndHeightComponent
1135+ ]
1136+ } ) . compileComponents ( ) ;
11241137 } ) ) ;
11251138
11261139 it ( 'should use itemSize when no width or height are provided' , ( ) => {
@@ -1136,10 +1149,12 @@ describe('IgxForOf directive -', () => {
11361149 } ) ;
11371150
11381151 describe ( 'even odd first last functions' , ( ) => {
1139- configureTestSuite ( ( ( ) => {
1140- return TestBed . configureTestingModule ( {
1141- imports : [ LocalVariablesComponent ]
1142- } ) ;
1152+ beforeEach ( waitForAsync ( ( ) => {
1153+ TestBed . configureTestingModule ( {
1154+ imports : [
1155+ LocalVariablesComponent
1156+ ]
1157+ } ) . compileComponents ( ) ;
11431158 } ) ) ;
11441159
11451160 it ( 'should differentiate even odd items' , ( ) => {
@@ -1164,10 +1179,12 @@ describe('IgxForOf directive -', () => {
11641179 } ) ;
11651180
11661181 describe ( '`as` syntax' , ( ) => {
1167- configureTestSuite ( ( ( ) => {
1168- return TestBed . configureTestingModule ( {
1169- imports : [ LocalVariablesAsComponent ]
1170- } ) ;
1182+ beforeEach ( waitForAsync ( ( ) => {
1183+ TestBed . configureTestingModule ( {
1184+ imports : [
1185+ LocalVariablesAsComponent
1186+ ]
1187+ } ) . compileComponents ( ) ;
11711188 } ) ) ;
11721189
11731190 it ( 'should get correct data using `as` syntax' , ( ) => {
@@ -1185,10 +1202,12 @@ describe('IgxForOf directive -', () => {
11851202 describe ( 'on destroy' , ( ) => {
11861203 let fix : ComponentFixture < VerticalVirtualDestroyComponent > ;
11871204
1188- configureTestSuite ( ( ( ) => {
1189- return TestBed . configureTestingModule ( {
1190- imports : [ VerticalVirtualDestroyComponent ]
1191- } ) ;
1205+ beforeEach ( waitForAsync ( ( ) => {
1206+ TestBed . configureTestingModule ( {
1207+ imports : [
1208+ VerticalVirtualDestroyComponent
1209+ ]
1210+ } ) . compileComponents ( ) ;
11921211 } ) ) ;
11931212
11941213 beforeEach ( ( ) => {
@@ -1230,18 +1249,19 @@ describe('IgxForOf directive -', () => {
12301249 describe ( 'on create new instance' , ( ) => {
12311250 let fix : ComponentFixture < VerticalVirtualCreateComponent > ;
12321251
1233- configureTestSuite ( ( ( ) => {
1234- return TestBed . configureTestingModule ( {
1235- imports : [ VerticalVirtualCreateComponent ]
1236- } ) ;
1252+ beforeEach ( waitForAsync ( ( ) => {
1253+ TestBed . configureTestingModule ( {
1254+ imports : [
1255+ VerticalVirtualCreateComponent
1256+ ]
1257+ } ) . compileComponents ( ) ;
12371258 } ) ) ;
12381259
12391260 beforeEach ( ( ) => {
12401261 fix = TestBed . createComponent ( VerticalVirtualCreateComponent ) ;
12411262 fix . componentInstance . data = dg . generateVerticalData ( fix . componentInstance . cols ) ;
12421263 fix . componentRef . hostView . detectChanges ( ) ;
12431264 fix . detectChanges ( ) ;
1244-
12451265 } ) ;
12461266
12471267 it ( 'should reset scroll position if new component is created.' , async ( ) => {
0 commit comments