@@ -15,6 +15,7 @@ import {MdAutocomplete} from './autocomplete';
1515import { MdInputContainer } from '../input/input-container' ;
1616import { Observable } from 'rxjs/Observable' ;
1717import { dispatchFakeEvent } from '../core/testing/dispatch-events' ;
18+ import { typeInElement } from '../core/testing/type-in-element' ;
1819
1920import 'rxjs/add/operator/map' ;
2021
@@ -781,7 +782,7 @@ describe('MdAutocomplete', () => {
781782 fixture . whenStable ( ) . then ( ( ) => {
782783 fixture . detectChanges ( ) ;
783784 expect ( input . getAttribute ( 'aria-expanded' ) )
784- . toBe ( 'false' , 'Expected aria-expanded to be false when panel hides itself.' ) ;
785+ . toBe ( 'false' , 'Expected aria-expanded to be false when panel hides itself.' ) ;
785786 } ) ;
786787 } ) ;
787788 } ) ;
@@ -1025,18 +1026,6 @@ class AutocompleteWithoutForms {
10251026
10261027}
10271028
1028- /**
1029- * Focuses an input, sets its value and dispatches
1030- * the `input` event, simulating the user typing.
1031- * @param value Value to be set on the input.
1032- * @param element Element onto which to set the value.
1033- */
1034- function typeInElement ( value : string , element : HTMLInputElement , autoFocus = true ) {
1035- element . focus ( ) ;
1036- element . value = value ;
1037- dispatchFakeEvent ( element , 'input' ) ;
1038- }
1039-
10401029/** This is a mock keyboard event to test keyboard events in the autocomplete. */
10411030class MockKeyboardEvent {
10421031 constructor ( public keyCode : number ) { }
0 commit comments