@@ -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
@@ -807,7 +808,7 @@ describe('MdAutocomplete', () => {
807
808
fixture . whenStable ( ) . then ( ( ) => {
808
809
fixture . detectChanges ( ) ;
809
810
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.' ) ;
811
812
} ) ;
812
813
} ) ;
813
814
} ) ;
@@ -1114,18 +1115,6 @@ class AutocompleteWithNgModel {
1114
1115
1115
1116
}
1116
1117
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
-
1129
1118
/** This is a mock keyboard event to test keyboard events in the autocomplete. */
1130
1119
class MockKeyboardEvent {
1131
1120
constructor ( public keyCode : number ) { }
0 commit comments