@@ -1092,26 +1092,26 @@ describe('IgxDatePicker', () => {
10921092 } ) ;
10931093
10941094 describe ( 'Drop-down mode select all text on focus' , ( ) => {
1095- let fixture : ComponentFixture < IgxDatePickerOpeningComponent > ;
1095+ let fixture : ComponentFixture < IgxDatePickerEditableComponent > ;
10961096 let datePicker : IgxDatePickerComponent ;
10971097
10981098 beforeEach ( ( ) => {
1099- fixture = TestBed . createComponent ( IgxDatePickerOpeningComponent ) ;
1099+ fixture = TestBed . createComponent ( IgxDatePickerEditableComponent ) ;
11001100 datePicker = fixture . componentInstance . datePicker ;
11011101 fixture . detectChanges ( ) ;
11021102 } ) ;
11031103
1104- it ( 'Should select all input text on input focus' , async ( ) => {
1104+ it ( 'Should select all input text on input focus' , fakeAsync ( ( ) => {
11051105 const input = fixture . debugElement . query ( By . directive ( IgxInputDirective ) ) . nativeElement ;
11061106 input . focus ( ) ;
11071107 fixture . detectChanges ( ) ;
1108- await wait ( 100 ) ;
1108+ tick ( 100 ) ;
11091109
11101110 expect ( input ) . toEqual ( document . activeElement ) ;
11111111 expect ( input . selectionEnd ) . toEqual ( input . value . length ) ;
11121112 expect ( input . selectionStart ) . toEqual ( 0 ) ;
11131113 expect ( input . value . substring ( input . selectionStart , input . selectionEnd ) ) . toEqual ( input . value ) ;
1114- } ) ;
1114+ } ) ) ;
11151115 } ) ;
11161116} ) ;
11171117
@@ -1252,10 +1252,9 @@ export class IgxDatePickerCustomizedComponent {
12521252@Component ( {
12531253 template :
12541254 `
1255- <igx-date-picker mode="dropdown" [value]="date" ></igx-date-picker>
1255+ <igx-date-picker mode="dropdown"></igx-date-picker>
12561256 `
12571257} )
12581258export class IgxDatePickerOpeningComponent {
12591259 @ViewChild ( IgxDatePickerComponent , { static : true } ) public datePicker : IgxDatePickerComponent ;
1260- public date = new Date ( 2017 , 7 , 7 ) ;
12611260}
0 commit comments