@@ -16,7 +16,7 @@ import { InteractionMode } from '../core/enums';
1616import { DateRangeType } from '../core/dates/dateRange' ;
1717import { OverlayCancelableEventArgs , OverlayEventArgs , OverlayClosingEventArgs , HorizontalAlignment , VerticalAlignment } from '../services' ;
1818
19- fdescribe ( 'IgxDatePicker' , ( ) => {
19+ describe ( 'IgxDatePicker' , ( ) => {
2020 configureTestSuite ( ) ;
2121 beforeAll ( async ( ( ) => {
2222 TestBed . configureTestingModule ( {
@@ -1316,7 +1316,6 @@ fdescribe('IgxDatePicker', () => {
13161316 UIInteractions . clickElement ( datePickerOnBlurComponent . getEditElement ( ) , HorizontalAlignment . Center , VerticalAlignment . Middle ) ;
13171317 fixture . detectChanges ( ) ;
13181318
1319- console . log ( document . activeElement ) ;
13201319 expect ( formGroup . controls . datePickerOnBlur . status ) . toEqual ( 'VALID' ) ;
13211320 expect ( inputGroup . isRequired ) . toBeTruthy ( ) ;
13221321 expect ( inputGroup . validClass ) . toBeFalsy ( ) ;
@@ -1336,40 +1335,23 @@ fdescribe('IgxDatePicker', () => {
13361335 datePickerOnBlurComponent . mode = InteractionMode . DropDown ;
13371336 fixture . detectChanges ( ) ;
13381337
1339- console . log ( document . activeElement ) ;
13401338 expect ( inputGroup . isRequired ) . toBeTruthy ( ) ;
13411339 expect ( inputGroup . validClass ) . toBeFalsy ( ) ;
13421340 expect ( inputGroup . invalidClass ) . toBeTruthy ( ) ;
13431341 expect ( formGroup . controls . datePickerOnBlur . status ) . toEqual ( 'INVALID' ) ;
13441342 } ) ) ;
13451343
13461344 // Bug #6025 Date picker does not disable in reactive form
1347- it ( 'Should disable when form is disabled' , fakeAsync ( ( ) => {
1348- fixture . detectChanges ( ) ;
1345+ it ( 'Should disable when form is disabled' , ( ) => {
13491346 const formGroup : FormGroup = fixture . componentInstance . reactiveForm ;
13501347 const inputGroup = ( datePickerOnChangeComponent as any ) . inputGroup as IgxInputGroupComponent ;
13511348
1352- inputGroup . element . nativeElement . click ( ) ;
1353- fixture . detectChanges ( ) ;
1354- tick ( ) ;
1355- expect ( datePickerOnChangeComponent . collapsed ) . toBeFalsy ( ) ;
1356-
1357- // inputGroup.element.nativeElement.click();
1358- datePickerOnChangeComponent . closeCalendar ( ) ;
1359- fixture . detectChanges ( ) ;
1360- tick ( ) ;
1361- expect ( datePickerOnChangeComponent . collapsed ) . toBeTruthy ( ) ;
1349+ expect ( inputGroup . disabled ) . toBeFalsy ( ) ;
13621350
13631351 formGroup . disable ( ) ;
13641352 fixture . detectChanges ( ) ;
1365- tick ( ) ;
1366-
1367- inputGroup . element . nativeElement . parentElement . click ( ) ;
1368- fixture . detectChanges ( ) ;
1369- tick ( ) ;
1370- const dateDropDown = document . getElementsByClassName ( 'igx-date-picker--dropdown' ) ;
1371- expect ( dateDropDown . length ) . toEqual ( 0 ) ;
1372- } ) ) ;
1353+ expect ( inputGroup . disabled ) . toBeTruthy ( ) ;
1354+ } ) ;
13731355 } ) ;
13741356
13751357 describe ( 'Control value accessor unit tests' , ( ) => {
@@ -1582,7 +1564,6 @@ export class IgxDatePickerOpeningComponent {
15821564 <igx-date-picker formControlName="datePickerOnChange" #datePickerOnChangeComponent></igx-date-picker>
15831565 <igx-date-picker formControlName="datePickerOnBlur" #datePickerOnBlurComponent></igx-date-picker>
15841566 </form>
1585- <input #input />
15861567`
15871568} )
15881569class IgxDatePickerReactiveFormComponent {
@@ -1592,9 +1573,6 @@ class IgxDatePickerReactiveFormComponent {
15921573 @ViewChild ( 'datePickerOnBlurComponent' , { read : IgxDatePickerComponent , static : true } )
15931574 public datePickerOnBlurComponent : IgxDatePickerComponent ;
15941575
1595- @ViewChild ( 'input' , { static : true } )
1596- public input : ElementRef ;
1597-
15981576 reactiveForm : FormGroup ;
15991577
16001578 constructor ( fb : FormBuilder ) {
0 commit comments