@@ -27,6 +27,7 @@ describe('IgxInputGroup', () => {
27
27
InputGroupBoxComponent ,
28
28
InputGroupBorderComponent ,
29
29
InputGroupSearchComponent ,
30
+ InputGroupFileComponent ,
30
31
InputGroupDisabledComponent ,
31
32
InputGroupDisabledByDefaultComponent ,
32
33
InputGroupCosyDisplayDensityComponent ,
@@ -94,6 +95,15 @@ describe('IgxInputGroup', () => {
94
95
testInputGroupType ( 'search' , igxInputGroup , inputGroupElement ) ;
95
96
} ) ) ;
96
97
98
+ it ( 'Initializes upload file button with type=\'button\'.' , ( ) => {
99
+ const fixture = TestBed . createComponent ( InputGroupFileComponent ) ;
100
+ fixture . detectChanges ( ) ;
101
+
102
+ const uploadFileButton = fixture . debugElement . query ( By . css ( 'button' ) ) . nativeElement ;
103
+
104
+ expect ( uploadFileButton . getAttribute ( 'type' ) ) . toEqual ( 'button' ) ;
105
+ } ) ;
106
+
97
107
it ( 'Should respect type Token and be able to change input group type programmatically.' , fakeAsync ( ( ) => {
98
108
const fixture = TestBed . createComponent ( InputGroupComponent ) ;
99
109
fixture . detectChanges ( ) ;
@@ -330,6 +340,13 @@ class InputGroupSearchComponent {
330
340
@ViewChild ( 'igxInputGroup' , { static : true } ) public igxInputGroup : IgxInputGroupComponent ;
331
341
}
332
342
343
+ @Component ( {
344
+ template : `<igx-input-group>
345
+ <input igxInput type="file" multiple />
346
+ </igx-input-group>`
347
+ } )
348
+ class InputGroupFileComponent { }
349
+
333
350
const testInputGroupType = ( type : IgxInputGroupType , component : IgxInputGroupComponent , nativeElement : HTMLInputElement ) => {
334
351
let isLine = false ;
335
352
let isBorder = false ;
0 commit comments