@@ -413,71 +413,67 @@ describe('IgxTabs', () => {
413
413
expect ( indicator . nativeElement . style . width ) . toBe ( '90px' ) ;
414
414
} ) ) ;
415
415
416
- fit ( 'should navigate to the correct URL when clicking on tab buttons' , fakeAsync ( ( ) => {
417
-
416
+ it ( 'should navigate to the correct URL when clicking on tab buttons' , fakeAsync ( ( ) => {
418
417
const router = TestBed . get ( Router ) ;
419
418
const location = TestBed . get ( Location ) ;
420
419
const fixture = TestBed . createComponent ( TabsRoutingTestComponent ) ;
421
420
const tabsComp = fixture . componentInstance . tabsComp ;
422
421
fixture . detectChanges ( ) ;
423
422
424
423
fixture . ngZone . run ( ( ) => { router . initialNavigation ( ) ; } ) ;
425
-
426
- tick ( ) ;
424
+ tick ( 200 ) ;
427
425
expect ( location . path ( ) ) . toBe ( '/view1' ) ;
428
426
429
427
fixture . ngZone . run ( ( ) => { tabsComp . tabs . toArray ( ) [ 2 ] . select ( ) ; } ) ;
430
- tick ( ) ;
428
+ tick ( 200 ) ;
431
429
expect ( location . path ( ) ) . toBe ( '/view3' ) ;
432
430
433
431
fixture . ngZone . run ( ( ) => { tabsComp . tabs . toArray ( ) [ 1 ] . select ( ) ; } ) ;
434
- tick ( ) ;
432
+ tick ( 200 ) ;
435
433
expect ( location . path ( ) ) . toBe ( '/view2' ) ;
436
434
437
435
fixture . ngZone . run ( ( ) => { tabsComp . tabs . toArray ( ) [ 0 ] . select ( ) ; } ) ;
438
- tick ( ) ;
436
+ tick ( 200 ) ;
439
437
expect ( location . path ( ) ) . toBe ( '/view1' ) ;
440
438
} ) ) ;
441
439
442
- fit ( 'should select the correct tab button/panel when navigating an URL' , fakeAsync ( ( ) => {
443
-
440
+ it ( 'should select the correct tab button/panel when navigating an URL' , fakeAsync ( ( ) => {
444
441
const router = TestBed . get ( Router ) ;
445
442
const location = TestBed . get ( Location ) ;
446
443
const fixture = TestBed . createComponent ( TabsRoutingTestComponent ) ;
447
444
const tabsComp = fixture . componentInstance . tabsComp ;
448
445
fixture . detectChanges ( ) ;
449
446
450
447
fixture . ngZone . run ( ( ) => { router . initialNavigation ( ) ; } ) ;
451
- tick ( ) ;
448
+ tick ( 300 ) ;
452
449
expect ( location . path ( ) ) . toBe ( '/view1' ) ;
453
450
expect ( tabsComp . selectedIndex ) . toBe ( 0 ) ;
454
451
expect ( tabsComp . groups . toArray ( ) [ 0 ] . isSelected ) . toBe ( true ) ;
455
452
expect ( tabsComp . tabs . toArray ( ) [ 0 ] . isSelected ) . toBe ( true ) ;
456
453
457
454
fixture . ngZone . run ( ( ) => { router . navigate ( [ '/view3' ] ) ; } ) ;
458
- tick ( ) ;
455
+ tick ( 300 ) ;
459
456
expect ( location . path ( ) ) . toBe ( '/view3' ) ;
460
457
fixture . detectChanges ( ) ;
461
458
expect ( tabsComp . selectedIndex ) . toBe ( 2 ) ;
462
459
expect ( tabsComp . groups . toArray ( ) [ 2 ] . isSelected ) . toBe ( true ) ;
463
460
expect ( tabsComp . tabs . toArray ( ) [ 2 ] . isSelected ) . toBe ( true ) ;
464
461
465
462
fixture . ngZone . run ( ( ) => { router . navigate ( [ '/view2' ] ) ; } ) ;
466
- tick ( ) ;
463
+ tick ( 300 ) ;
467
464
expect ( location . path ( ) ) . toBe ( '/view2' ) ;
468
465
fixture . detectChanges ( ) ;
469
466
expect ( tabsComp . selectedIndex ) . toBe ( 1 ) ;
470
467
expect ( tabsComp . groups . toArray ( ) [ 1 ] . isSelected ) . toBe ( true ) ;
471
468
expect ( tabsComp . tabs . toArray ( ) [ 1 ] . isSelected ) . toBe ( true ) ;
472
469
473
470
fixture . ngZone . run ( ( ) => { router . navigate ( [ '/view1' ] ) ; } ) ;
474
- tick ( ) ;
471
+ tick ( 300 ) ;
475
472
expect ( location . path ( ) ) . toBe ( '/view1' ) ;
476
473
fixture . detectChanges ( ) ;
477
474
expect ( tabsComp . selectedIndex ) . toBe ( 0 ) ;
478
475
expect ( tabsComp . groups . toArray ( ) [ 0 ] . isSelected ) . toBe ( true ) ;
479
476
expect ( tabsComp . tabs . toArray ( ) [ 0 ] . isSelected ) . toBe ( true ) ;
480
-
481
477
} ) ) ;
482
478
} ) ;
483
479
0 commit comments