@@ -15,6 +15,7 @@ import {MdAutocomplete} from './autocomplete';
15
15
import { MdInputContainer } from '../input/input-container' ;
16
16
import { Observable } from 'rxjs/Observable' ;
17
17
import { dispatchFakeEvent } from '../core/testing/dispatch-events' ;
18
+ import { typeInElement } from '../core/testing/type-in-element' ;
18
19
19
20
import 'rxjs/add/operator/map' ;
20
21
@@ -781,7 +782,7 @@ describe('MdAutocomplete', () => {
781
782
fixture . whenStable ( ) . then ( ( ) => {
782
783
fixture . detectChanges ( ) ;
783
784
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.' ) ;
785
786
} ) ;
786
787
} ) ;
787
788
} ) ;
@@ -1025,18 +1026,6 @@ class AutocompleteWithoutForms {
1025
1026
1026
1027
}
1027
1028
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
-
1040
1029
/** This is a mock keyboard event to test keyboard events in the autocomplete. */
1041
1030
class MockKeyboardEvent {
1042
1031
constructor ( public keyCode : number ) { }
0 commit comments