@@ -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
@@ -807,7 +808,7 @@ describe('MdAutocomplete', () => {
807808 fixture . whenStable ( ) . then ( ( ) => {
808809 fixture . detectChanges ( ) ;
809810 expect ( input . getAttribute ( 'aria-expanded' ) )
810- . toBe ( 'false' , 'Expected aria-expanded to be false when panel hides itself.' ) ;
811+ . toBe ( 'false' , 'Expected aria-expanded to be false when panel hides itself.' ) ;
811812 } ) ;
812813 } ) ;
813814 } ) ;
@@ -1114,18 +1115,6 @@ class AutocompleteWithNgModel {
11141115
11151116}
11161117
1117- /**
1118- * Focuses an input, sets its value and dispatches
1119- * the `input` event, simulating the user typing.
1120- * @param value Value to be set on the input.
1121- * @param element Element onto which to set the value.
1122- */
1123- function typeInElement ( value : string , element : HTMLInputElement , autoFocus = true ) {
1124- element . focus ( ) ;
1125- element . value = value ;
1126- dispatchFakeEvent ( element , 'input' ) ;
1127- }
1128-
11291118/** This is a mock keyboard event to test keyboard events in the autocomplete. */
11301119class MockKeyboardEvent {
11311120 constructor ( public keyCode : number ) { }
0 commit comments