@@ -16,7 +16,6 @@ describe('MatChipInput', () => {
16
16
let inputDebugElement : DebugElement ;
17
17
let inputNativeElement : HTMLElement ;
18
18
let chipInputDirective : MatChipInput ;
19
-
20
19
let dir = 'ltr' ;
21
20
22
21
beforeEach ( async ( ( ) => {
@@ -56,6 +55,15 @@ describe('MatChipInput', () => {
56
55
it ( 'should have a default id' , ( ) => {
57
56
expect ( inputNativeElement . getAttribute ( 'id' ) ) . toBeTruthy ( ) ;
58
57
} ) ;
58
+
59
+ it ( 'should allow binding to the `placeholder` input' , ( ) => {
60
+ expect ( inputNativeElement . hasAttribute ( 'placeholder' ) ) . toBe ( false ) ;
61
+
62
+ testChipInput . placeholder = 'bound placeholder' ;
63
+ fixture . detectChanges ( ) ;
64
+
65
+ expect ( inputNativeElement . getAttribute ( 'placeholder' ) ) . toBe ( 'bound placeholder' ) ;
66
+ } ) ;
59
67
} ) ;
60
68
61
69
describe ( '[addOnBlur]' , ( ) => {
@@ -142,11 +150,13 @@ describe('MatChipInput', () => {
142
150
</mat-chip-list>
143
151
<input matInput [matChipInputFor]="chipList"
144
152
[matChipInputAddOnBlur]="addOnBlur"
145
- (matChipInputTokenEnd)="add($event)" />
153
+ (matChipInputTokenEnd)="add($event)"
154
+ [placeholder]="placeholder" />
146
155
`
147
156
} )
148
157
class TestChipInput {
149
158
addOnBlur : boolean = false ;
159
+ placeholder = '' ;
150
160
151
161
add ( _ : MatChipInputEvent ) {
152
162
}
0 commit comments