@@ -33,7 +33,7 @@ function trigger (target, event, process) {
33
33
function describeFunctions ( formlyElement , inputElement , inputType = 'text' , options ) {
34
34
beforeEach ( ( ) => {
35
35
data . fields [ 0 ] . type = formlyElement ;
36
- data . fields [ 0 ] . templateOptions . type = inputType ;
36
+ data . fields [ 0 ] . templateOptions . inputType = inputType ;
37
37
if ( typeof options != 'undefined' ) data . fields [ 0 ] . options = options ;
38
38
spy = sinon . spy ( ) ;
39
39
} ) ;
@@ -103,7 +103,7 @@ function describeFunctions(formlyElement, inputElement, inputType = 'text', opti
103
103
function describeAttributes ( inputElement , testPlaceholder = true ) {
104
104
beforeEach ( ( ) => {
105
105
data . fields [ 0 ] . type = inputElement ;
106
- data . fields [ 0 ] . templateOptions . type = 'text' ;
106
+ data . fields [ 0 ] . templateOptions . inputType = 'text' ;
107
107
} ) ;
108
108
109
109
it ( 'attributes' , ( ) => {
@@ -142,7 +142,7 @@ function describeAttributes(inputElement, testPlaceholder = true){
142
142
function describeConditional ( inputElement ) {
143
143
it ( 'label' , ( done ) => {
144
144
data . fields [ 0 ] . type = inputElement ;
145
- data . fields [ 0 ] . templateOptions . type = 'text' ;
145
+ data . fields [ 0 ] . templateOptions . inputType = 'text' ;
146
146
data . fields [ 0 ] . templateOptions . label = '' ;
147
147
createForm ( data ) ;
148
148
@@ -187,7 +187,7 @@ describe('Bootstrap Field Inputs', () => {
187
187
describeAttributes ( 'input' ) ;
188
188
it ( 'should have input type as a class' , ( ) => {
189
189
data . fields [ 0 ] . type = 'input' ;
190
- data . fields [ 0 ] . templateOptions . type = 'text' ;
190
+ data . fields [ 0 ] . templateOptions . inputType = 'text' ;
191
191
createForm ( data ) ;
192
192
193
193
let els = vm . $el . querySelectorAll ( '.text' ) ;
@@ -203,7 +203,7 @@ describe('Bootstrap Field Inputs', () => {
203
203
204
204
it ( 'layout' , ( done ) => {
205
205
data . fields [ 0 ] . type = 'input' ;
206
- data . fields [ 0 ] . templateOptions . type = 'text' ;
206
+ data . fields [ 0 ] . templateOptions . inputType = 'text' ;
207
207
createForm ( data ) ;
208
208
209
209
let inputs = vm . $el . querySelectorAll ( 'input' ) ;
@@ -226,7 +226,7 @@ describe('Bootstrap Field Inputs', () => {
226
226
227
227
it ( 'adds active and focus classes' , ( done ) => {
228
228
data . fields [ 0 ] . type = 'input' ;
229
- data . fields [ 0 ] . templateOptions . type = 'text' ;
229
+ data . fields [ 0 ] . templateOptions . inputType = 'text' ;
230
230
createForm ( data ) ;
231
231
232
232
expect ( vm . $el . querySelectorAll ( '.formly-has-focus' ) ) . to . be . length ( 0 ) ;
@@ -243,7 +243,7 @@ describe('Bootstrap Field Inputs', () => {
243
243
244
244
it ( 'defaults to text' , ( ) => {
245
245
data . fields [ 0 ] . type = 'input' ;
246
- data . fields [ 0 ] . templateOptions . type = undefined ;
246
+ data . fields [ 0 ] . templateOptions . inputType = undefined ;
247
247
createForm ( data ) ;
248
248
249
249
let inputs = vm . $el . querySelectorAll ( 'input' ) ;
@@ -363,7 +363,7 @@ describe('Bootstrap Field Inputs', () => {
363
363
364
364
it ( 'array options' , ( ) => {
365
365
data . fields [ 0 ] . type = 'list' ;
366
- data . fields [ 0 ] . templateOptions . type = 'checkbox' ;
366
+ data . fields [ 0 ] . templateOptions . inputType = 'checkbox' ;
367
367
data . fields [ 0 ] . options = [ 'one' , 'two' , 'three' ] ;
368
368
createForm ( ) ;
369
369
@@ -378,7 +378,7 @@ describe('Bootstrap Field Inputs', () => {
378
378
379
379
it ( 'object options' , ( ) => {
380
380
data . fields [ 0 ] . type = 'list' ;
381
- data . fields [ 0 ] . templateOptions . type = 'checkbox'
381
+ data . fields [ 0 ] . templateOptions . inputType = 'checkbox'
382
382
data . fields [ 0 ] . options = [
383
383
{ label : 'Foo' , value : 'bar' } ,
384
384
{ label : 'Bar' , value : 'foo' }
@@ -418,7 +418,7 @@ describe('Bootstrap Field Inputs', () => {
418
418
419
419
it ( 'multiple values' , ( done ) => {
420
420
data . fields [ 0 ] . type = 'list' ;
421
- data . fields [ 0 ] . templateOptions . type = 'checkbox' ;
421
+ data . fields [ 0 ] . templateOptions . inputType = 'checkbox' ;
422
422
data . fields [ 0 ] . options = [ 'one' , 'two' ] ;
423
423
createForm ( ) ;
424
424
@@ -433,7 +433,7 @@ describe('Bootstrap Field Inputs', () => {
433
433
434
434
it ( 'single value' , ( done ) => {
435
435
data . fields [ 0 ] . type = 'list' ;
436
- data . fields [ 0 ] . templateOptions . type = 'radio' ;
436
+ data . fields [ 0 ] . templateOptions . inputType = 'radio' ;
437
437
data . fields [ 0 ] . options = [ 'one' , 'two' ] ;
438
438
createForm ( ) ;
439
439
0 commit comments