5
5
*/
6
6
7
7
import { Component , ElementRef , EventEmitter , Input , Output , QueryList , ViewChild , ViewChildren } from '@angular/core' ;
8
- import { ComponentFixture , fakeAsync , flush , TestBed } from '@angular/core/testing' ;
8
+ import { ComponentFixture , fakeAsync , flush , TestBed , tick } from '@angular/core/testing' ;
9
9
import { FormControl , FormsModule , ReactiveFormsModule } from '@angular/forms' ;
10
10
import { By } from '@angular/platform-browser' ;
11
11
import { RouterTestingModule } from '@angular/router/testing' ;
@@ -737,6 +737,8 @@ describe('NbSelectComponent - falsy values', () => {
737
737
testComponent . noValueOption . onClick ( eventMock ) ;
738
738
fixture . detectChanges ( ) ;
739
739
740
+ tick ( 1000 ) ;
741
+
740
742
expect ( select . selectionModel . length ) . toEqual ( 0 ) ;
741
743
} ) ) ;
742
744
@@ -747,6 +749,8 @@ describe('NbSelectComponent - falsy values', () => {
747
749
testComponent . nullOption . onClick ( eventMock ) ;
748
750
fixture . detectChanges ( ) ;
749
751
752
+ tick ( 1000 ) ;
753
+
750
754
expect ( select . selectionModel . length ) . toEqual ( 0 ) ;
751
755
} ) ) ;
752
756
@@ -757,6 +761,8 @@ describe('NbSelectComponent - falsy values', () => {
757
761
testComponent . undefinedOption . onClick ( eventMock ) ;
758
762
fixture . detectChanges ( ) ;
759
763
764
+ tick ( 1000 ) ;
765
+
760
766
expect ( select . selectionModel . length ) . toEqual ( 0 ) ;
761
767
} ) ) ;
762
768
@@ -767,6 +773,8 @@ describe('NbSelectComponent - falsy values', () => {
767
773
testComponent . falseOption . onClick ( eventMock ) ;
768
774
fixture . detectChanges ( ) ;
769
775
776
+ tick ( 1000 ) ;
777
+
770
778
expect ( select . selectionModel . length ) . toEqual ( 1 ) ;
771
779
} ) ) ;
772
780
@@ -777,6 +785,8 @@ describe('NbSelectComponent - falsy values', () => {
777
785
testComponent . zeroOption . onClick ( eventMock ) ;
778
786
fixture . detectChanges ( ) ;
779
787
788
+ tick ( 1000 ) ;
789
+
780
790
expect ( select . selectionModel . length ) . toEqual ( 1 ) ;
781
791
} ) ) ;
782
792
@@ -787,6 +797,8 @@ describe('NbSelectComponent - falsy values', () => {
787
797
testComponent . emptyStringOption . onClick ( eventMock ) ;
788
798
fixture . detectChanges ( ) ;
789
799
800
+ tick ( 1000 ) ;
801
+
790
802
expect ( select . selectionModel . length ) . toEqual ( 1 ) ;
791
803
} ) ) ;
792
804
@@ -797,6 +809,8 @@ describe('NbSelectComponent - falsy values', () => {
797
809
testComponent . nanOption . onClick ( eventMock ) ;
798
810
fixture . detectChanges ( ) ;
799
811
812
+ tick ( 1000 ) ;
813
+
800
814
expect ( select . selectionModel . length ) . toEqual ( 1 ) ;
801
815
} ) ) ;
802
816
0 commit comments