@@ -16,7 +16,7 @@ import { InteractionMode } from '../core/enums';
16
16
import { DateRangeType } from '../core/dates/dateRange' ;
17
17
import { OverlayCancelableEventArgs , OverlayEventArgs , OverlayClosingEventArgs , HorizontalAlignment , VerticalAlignment } from '../services' ;
18
18
19
- fdescribe ( 'IgxDatePicker' , ( ) => {
19
+ describe ( 'IgxDatePicker' , ( ) => {
20
20
configureTestSuite ( ) ;
21
21
beforeAll ( async ( ( ) => {
22
22
TestBed . configureTestingModule ( {
@@ -1316,7 +1316,6 @@ fdescribe('IgxDatePicker', () => {
1316
1316
UIInteractions . clickElement ( datePickerOnBlurComponent . getEditElement ( ) , HorizontalAlignment . Center , VerticalAlignment . Middle ) ;
1317
1317
fixture . detectChanges ( ) ;
1318
1318
1319
- console . log ( document . activeElement ) ;
1320
1319
expect ( formGroup . controls . datePickerOnBlur . status ) . toEqual ( 'VALID' ) ;
1321
1320
expect ( inputGroup . isRequired ) . toBeTruthy ( ) ;
1322
1321
expect ( inputGroup . validClass ) . toBeFalsy ( ) ;
@@ -1336,40 +1335,23 @@ fdescribe('IgxDatePicker', () => {
1336
1335
datePickerOnBlurComponent . mode = InteractionMode . DropDown ;
1337
1336
fixture . detectChanges ( ) ;
1338
1337
1339
- console . log ( document . activeElement ) ;
1340
1338
expect ( inputGroup . isRequired ) . toBeTruthy ( ) ;
1341
1339
expect ( inputGroup . validClass ) . toBeFalsy ( ) ;
1342
1340
expect ( inputGroup . invalidClass ) . toBeTruthy ( ) ;
1343
1341
expect ( formGroup . controls . datePickerOnBlur . status ) . toEqual ( 'INVALID' ) ;
1344
1342
} ) ) ;
1345
1343
1346
1344
// 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' , ( ) => {
1349
1346
const formGroup : FormGroup = fixture . componentInstance . reactiveForm ;
1350
1347
const inputGroup = ( datePickerOnChangeComponent as any ) . inputGroup as IgxInputGroupComponent ;
1351
1348
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 ( ) ;
1362
1350
1363
1351
formGroup . disable ( ) ;
1364
1352
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
+ } ) ;
1373
1355
} ) ;
1374
1356
1375
1357
describe ( 'Control value accessor unit tests' , ( ) => {
@@ -1582,7 +1564,6 @@ export class IgxDatePickerOpeningComponent {
1582
1564
<igx-date-picker formControlName="datePickerOnChange" #datePickerOnChangeComponent></igx-date-picker>
1583
1565
<igx-date-picker formControlName="datePickerOnBlur" #datePickerOnBlurComponent></igx-date-picker>
1584
1566
</form>
1585
- <input #input />
1586
1567
`
1587
1568
} )
1588
1569
class IgxDatePickerReactiveFormComponent {
@@ -1592,9 +1573,6 @@ class IgxDatePickerReactiveFormComponent {
1592
1573
@ViewChild ( 'datePickerOnBlurComponent' , { read : IgxDatePickerComponent , static : true } )
1593
1574
public datePickerOnBlurComponent : IgxDatePickerComponent ;
1594
1575
1595
- @ViewChild ( 'input' , { static : true } )
1596
- public input : ElementRef ;
1597
-
1598
1576
reactiveForm : FormGroup ;
1599
1577
1600
1578
constructor ( fb : FormBuilder ) {
0 commit comments