@@ -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
@@ -786,7 +787,7 @@ describe('MdAutocomplete', () => {
786
787
fixture . whenStable ( ) . then ( ( ) => {
787
788
fixture . detectChanges ( ) ;
788
789
expect ( input . getAttribute ( 'aria-expanded' ) )
789
- . toBe ( 'false' , 'Expected aria-expanded to be false when panel hides itself.' ) ;
790
+ . toBe ( 'false' , 'Expected aria-expanded to be false when panel hides itself.' ) ;
790
791
} ) ;
791
792
} ) ;
792
793
} ) ;
@@ -1072,18 +1073,6 @@ class AutocompleteWithNgModel {
1072
1073
1073
1074
}
1074
1075
1075
- /**
1076
- * Focuses an input, sets its value and dispatches
1077
- * the `input` event, simulating the user typing.
1078
- * @param value Value to be set on the input.
1079
- * @param element Element onto which to set the value.
1080
- */
1081
- function typeInElement ( value : string , element : HTMLInputElement , autoFocus = true ) {
1082
- element . focus ( ) ;
1083
- element . value = value ;
1084
- dispatchFakeEvent ( element , 'input' ) ;
1085
- }
1086
-
1087
1076
/** This is a mock keyboard event to test keyboard events in the autocomplete. */
1088
1077
class MockKeyboardEvent {
1089
1078
constructor ( public keyCode : number ) { }
0 commit comments