@@ -299,12 +299,13 @@ describe('MdInput', function () {
299299 fakeAsync ( ( ) => {
300300 fixture . detectChanges ( ) ;
301301
302+ let input : MdInput = fixture . debugElement . query ( By . directive ( MdInput ) ) . componentInstance ;
302303 let el : HTMLInputElement = fixture . debugElement . query ( By . css ( 'input' ) ) . nativeElement ;
303304
304305 expect ( el ) . not . toBeNull ( ) ;
305306 expect ( el . getAttribute ( 'autocomplete' ) ) . toBeNull ( ) ;
306307
307- fixture . componentInstance . autoComplete = 'on' ;
308+ input . autoComplete = 'on' ;
308309 fixture . detectChanges ( ) ;
309310 expect ( el . getAttribute ( 'autocomplete' ) ) . toEqual ( 'on' ) ;
310311 } ) ( ) ;
@@ -354,12 +355,13 @@ describe('MdInput', function () {
354355 fakeAsync ( ( ) => {
355356 fixture . detectChanges ( ) ;
356357
358+ let input : MdInput = fixture . debugElement . query ( By . directive ( MdInput ) ) . componentInstance ;
357359 let el : HTMLInputElement = fixture . debugElement . query ( By . css ( 'input' ) ) . nativeElement ;
358360
359361 expect ( el ) . not . toBeNull ( ) ;
360362 expect ( el . getAttribute ( 'autofocus' ) ) . toBeNull ( ) ;
361363
362- fixture . componentInstance . autoFocus = true ;
364+ input . autoFocus = true ;
363365 fixture . detectChanges ( ) ;
364366 expect ( el . getAttribute ( 'autofocus' ) ) . toEqual ( '' ) ;
365367 } ) ( ) ;
@@ -390,15 +392,15 @@ describe('MdInput', function () {
390392 . createAsync ( MdInputOptionalAttributeController )
391393 . then ( fixture => {
392394 fakeAsync ( ( ) => {
393- fixture . componentInstance . disabled = false ;
394- fixture . detectChanges ( ) ;
395-
395+ let input : MdInput = fixture . debugElement . query ( By . directive ( MdInput ) ) . componentInstance ;
396396 let el : HTMLInputElement = fixture . debugElement . query ( By . css ( 'input' ) ) . nativeElement ;
397-
398397 expect ( el ) . not . toBeNull ( ) ;
398+
399+ input . disabled = false ;
400+ fixture . detectChanges ( ) ;
399401 expect ( el . getAttribute ( 'disabled' ) ) . toEqual ( null ) ;
400402
401- fixture . componentInstance . disabled = true ;
403+ input . disabled = true ;
402404 fixture . detectChanges ( ) ;
403405 expect ( el . getAttribute ( 'disabled' ) ) . toEqual ( '' ) ;
404406 } ) ( ) ;
@@ -429,15 +431,15 @@ describe('MdInput', function () {
429431 . createAsync ( MdInputOptionalAttributeController )
430432 . then ( fixture => {
431433 fakeAsync ( ( ) => {
432- fixture . componentInstance . disabled = false ;
433- fixture . detectChanges ( ) ;
434-
434+ let input : MdInput = fixture . debugElement . query ( By . directive ( MdInput ) ) . componentInstance ;
435435 let el : HTMLInputElement = fixture . debugElement . query ( By . css ( 'input' ) ) . nativeElement ;
436-
437436 expect ( el ) . not . toBeNull ( ) ;
437+
438+ input . disabled = false ;
439+ fixture . detectChanges ( ) ;
438440 expect ( el . getAttribute ( 'list' ) ) . toEqual ( null ) ;
439441
440- fixture . componentInstance . list = 'datalist-id' ;
442+ input . list = 'datalist-id' ;
441443 fixture . detectChanges ( ) ;
442444 expect ( el . getAttribute ( 'list' ) ) . toEqual ( 'datalist-id' ) ;
443445 } ) ( ) ;
@@ -451,19 +453,19 @@ describe('MdInput', function () {
451453 . createAsync ( MdInputOptionalAttributeController )
452454 . then ( fixture => {
453455 fakeAsync ( ( ) => {
454- fixture . componentInstance . disabled = false ;
455- fixture . detectChanges ( ) ;
456-
456+ let input : MdInput = fixture . debugElement . query ( By . directive ( MdInput ) ) . componentInstance ;
457457 let el : HTMLInputElement = fixture . debugElement . query ( By . css ( 'input' ) ) . nativeElement ;
458-
459458 expect ( el ) . not . toBeNull ( ) ;
459+
460+ input . disabled = false ;
461+ fixture . detectChanges ( ) ;
460462 expect ( el . getAttribute ( 'max' ) ) . toEqual ( null ) ;
461463
462- fixture . componentInstance . max = 10 ;
464+ input . max = 10 ;
463465 fixture . detectChanges ( ) ;
464466 expect ( el . getAttribute ( 'max' ) ) . toEqual ( '10' ) ;
465467
466- fixture . componentInstance . max = '2000-01-02' ;
468+ input . max = '2000-01-02' ;
467469 fixture . detectChanges ( ) ;
468470 expect ( el . getAttribute ( 'max' ) ) . toEqual ( '2000-01-02' ) ;
469471 } ) ( ) ;
@@ -477,19 +479,19 @@ describe('MdInput', function () {
477479 . createAsync ( MdInputOptionalAttributeController )
478480 . then ( fixture => {
479481 fakeAsync ( ( ) => {
480- fixture . componentInstance . disabled = false ;
481- fixture . detectChanges ( ) ;
482-
482+ let input : MdInput = fixture . debugElement . query ( By . directive ( MdInput ) ) . componentInstance ;
483483 let el : HTMLInputElement = fixture . debugElement . query ( By . css ( 'input' ) ) . nativeElement ;
484-
485484 expect ( el ) . not . toBeNull ( ) ;
485+
486+ input . disabled = false ;
487+ fixture . detectChanges ( ) ;
486488 expect ( el . getAttribute ( 'min' ) ) . toEqual ( null ) ;
487489
488- fixture . componentInstance . min = 10 ;
490+ input . min = 10 ;
489491 fixture . detectChanges ( ) ;
490492 expect ( el . getAttribute ( 'min' ) ) . toEqual ( '10' ) ;
491493
492- fixture . componentInstance . min = '2000-01-02' ;
494+ input . min = '2000-01-02' ;
493495 fixture . detectChanges ( ) ;
494496 expect ( el . getAttribute ( 'min' ) ) . toEqual ( '2000-01-02' ) ;
495497 } ) ( ) ;
@@ -505,12 +507,13 @@ describe('MdInput', function () {
505507 fakeAsync ( ( ) => {
506508 fixture . detectChanges ( ) ;
507509
510+ let input : MdInput = fixture . debugElement . query ( By . directive ( MdInput ) ) . componentInstance ;
508511 let el : HTMLInputElement = fixture . debugElement . query ( By . css ( 'input' ) ) . nativeElement ;
509512
510513 expect ( el ) . not . toBeNull ( ) ;
511514 expect ( el . getAttribute ( 'readonly' ) ) . toBeNull ( ) ;
512515
513- fixture . componentInstance . readOnly = true ;
516+ input . readOnly = true ;
514517 fixture . detectChanges ( ) ;
515518 expect ( el . getAttribute ( 'readonly' ) ) . toEqual ( '' ) ;
516519 } ) ( ) ;
@@ -543,12 +546,13 @@ describe('MdInput', function () {
543546 fakeAsync ( ( ) => {
544547 fixture . detectChanges ( ) ;
545548
549+ let input : MdInput = fixture . debugElement . query ( By . directive ( MdInput ) ) . componentInstance ;
546550 let el : HTMLInputElement = fixture . debugElement . query ( By . css ( 'input' ) ) . nativeElement ;
547551
548552 expect ( el ) . not . toBeNull ( ) ;
549553 expect ( el . getAttribute ( 'required' ) ) . toBeNull ( ) ;
550554
551- fixture . componentInstance . required = true ;
555+ input . required = true ;
552556 fixture . detectChanges ( ) ;
553557 expect ( el . getAttribute ( 'required' ) ) . toEqual ( '' ) ;
554558 } ) ( ) ;
@@ -581,12 +585,13 @@ describe('MdInput', function () {
581585 fakeAsync ( ( ) => {
582586 fixture . detectChanges ( ) ;
583587
588+ let input : MdInput = fixture . debugElement . query ( By . directive ( MdInput ) ) . componentInstance ;
584589 let el : HTMLInputElement = fixture . debugElement . query ( By . css ( 'input' ) ) . nativeElement ;
585590
586591 expect ( el ) . not . toBeNull ( ) ;
587592 expect ( el . getAttribute ( 'spellcheck' ) ) . toEqual ( 'false' ) ;
588593
589- fixture . componentInstance . spellCheck = true ;
594+ input . spellCheck = true ;
590595 fixture . detectChanges ( ) ;
591596 expect ( el . getAttribute ( 'spellcheck' ) ) . toEqual ( 'true' ) ;
592597 } ) ( ) ;
@@ -619,12 +624,13 @@ describe('MdInput', function () {
619624 fakeAsync ( ( ) => {
620625 fixture . detectChanges ( ) ;
621626
627+ let input : MdInput = fixture . debugElement . query ( By . directive ( MdInput ) ) . componentInstance ;
622628 let el : HTMLInputElement = fixture . debugElement . query ( By . css ( 'input' ) ) . nativeElement ;
623629
624630 expect ( el ) . not . toBeNull ( ) ;
625631 expect ( el . getAttribute ( 'step' ) ) . toEqual ( null ) ;
626632
627- fixture . componentInstance . step = 0.5 ;
633+ input . step = 0.5 ;
628634 fixture . detectChanges ( ) ;
629635 expect ( el . getAttribute ( 'step' ) ) . toEqual ( '0.5' ) ;
630636 } ) ( ) ;
@@ -640,12 +646,13 @@ describe('MdInput', function () {
640646 fakeAsync ( ( ) => {
641647 fixture . detectChanges ( ) ;
642648
649+ let input : MdInput = fixture . debugElement . query ( By . directive ( MdInput ) ) . componentInstance ;
643650 let el : HTMLInputElement = fixture . debugElement . query ( By . css ( 'input' ) ) . nativeElement ;
644651
645652 expect ( el ) . not . toBeNull ( ) ;
646653 expect ( el . getAttribute ( 'tabindex' ) ) . toEqual ( null ) ;
647654
648- fixture . componentInstance . tabIndex = 1 ;
655+ input . tabIndex = 1 ;
649656 fixture . detectChanges ( ) ;
650657 expect ( el . getAttribute ( 'tabindex' ) ) . toEqual ( '1' ) ;
651658 } ) ( ) ;
0 commit comments