Closed
Description
This issue is for tracking the discussion related to releasing v2.3.0
For example, I get the following output when running the v2.3.0 tests, looks like the majority of "errors" are related to fieldSelectEx.vue tests.
> vue-form-generator@2.3.0 pretest ./vue-form-generator
> npm run lint
> vue-form-generator@2.3.0 lint ./vue-form-generator
> eslint --ext=.js,.vue src test/unit/specs
> vue-form-generator@2.3.0 test ./vue-form-generator
> npm run unit
> vue-form-generator@2.3.0 unit ./vue-form-generator
> cross-env NODE_ENV=test nyc npm run mocha
> vue-form-generator@2.3.0 mocha ./vue-form-generator
> mocha-webpack --webpack-config build/webpack.test.config.js --require test/unit/setup.js test/unit/specs/**/*.spec.js
WEBPACK Compiling...
WEBPACK Compiled successfully in 5838ms
MOCHA Testing...
abstractField.vue
check static value
✓ should give the model static value
✓ should set new value to model if value changed
check nested value
✓ should give the model static value
✓ should set new value to model if value changed
check nested value if not exists
✓ should give the model static value
✓ should set new value to model if value changed
check value as get/set function
- should be called the schema.get function
✓ should set new value to model if value changed
check formatValueToField & formatValueToModel function
✓ should return the formatted value
✓ should set the formatted value to model
check schema onChanged event
✓ should called once the schema.onChanged
check validateAfterChanged option
✓ should not call validate function after value changed
✓ should call validate function after value changed
check validate function with one validator
✓ should call schema validator
check validate function if field is disabled
✓ should not call schema validator
check validate function if field is readonly
✓ should not call schema validator
check validate function with validator array
✓ should call schema validator
check schema onValidated event
✓ should called once the schema.onValidated
check schema onValidated event
✓ should return empty array
✓ should not call 'onValidated'
✓ should return empty array
check clearValidationErrors
✓ should be undefined
✓ should be an empty array
✓ should contain one error string
check getFieldID function
✓ should return slugified inputName, if available
✓ should return slugified label, if no inputName
✓ should return slugified model name, if no inputName or label
check classes application to fields
✓ should have 2 classes ('applied-class' and 'another-class')
FieldCheckbox.vue
check template
✓ should contain a checkbox element
✓ should contain the value
✓ input value should be the model value after changed
- model value should be the input value if changed
✓ should have 2 classes
check optional attribute
✓ should set autocomplete
✓ should set disabled
✓ should set inputName
check dynamic html attributes
check input/wrapper attributes
✓ input should have data-* attribute
check non-specific attributes
✓ input should have data-* attribute
fieldChecklist.vue
check listbox template
check template with static string array
✓ should contain a .listbox element
✓ should contain 7 items
✓ should checked the values
test values reactivity to changes
✓ listbox value should be the model value after changed
✓ model value should be the listbox value if changed
test 'is-checked' class attribution reactivity to changes
✓ .list-row with checked input should have a 'is-checked' class
✓ .list-row with checked input should have a 'is-checked' class after model value is changed
✓ .list-row with checked input should have a 'is-checked' class after listbox value is changed
check static values with { value, name } objects (default key name)
✓ should contain items
✓ should checked the values
test values reactivity to changes
✓ listbox value should be the model value after changed
✓ model value should be the listbox value if changed
test 'is-checked' class attribution reactivity to changes
✓ .list-row with checked input should have a 'is-checked' class
✓ .list-row with checked input should have a 'is-checked' class after model value is changed
✓ .list-row with checked input should have a 'is-checked' class after listbox value is changed
check static values with { id, label } objects (custom key name with `checklistOptions`)
✓ should contain items
✓ should checked the values
test values reactivity to changes
✓ listbox value should be the model value after changed
✓ model value should be the listbox value if changed
test 'is-checked' class attribution reactivity to changes
✓ .list-row with checked input should have a 'is-checked' class
✓ .list-row with checked input should have a 'is-checked' class after model value is changed
✓ .list-row with checked input should have a 'is-checked' class after listbox value is changed
check function values
✓ should contain items
✓ should checked the values
✓ should contain input name field withouth inputName
✓ should contain input name field with inputName
test values reactivity to changes
✓ listbox value should be the model value after changed
✓ model value should be the listbox value if changed
test 'is-checked' class attribution reactivity to changes
✓ .list-row with checked input should have a 'is-checked' class
✓ .list-row with checked input should have a 'is-checked' class after model value is changed
✓ .list-row with checked input should have a 'is-checked' class after listbox value is changed
check combobox template
check template
✓ should contain a .combobox element
✓ should contain a .dropList element
✓ should contain a .mainRow element
✓ should contain 7 checkbox it expanded
✓ should contain input name field withouth inputName
✓ should contain input name field with inputName
✓ should checked the values
test values reactivity to changes
✓ dropList value should be the model value after changed
✓ model value should be the dropList value if changed (add)
✓ model value should be the checklist value if changed (remove)
- model value should be the dropList value if changed (null)
test 'is-checked' class attribution reactivity to changes
✓ .list-row with checked input should have a 'is-checked' class
✓ .list-row with checked input should have a 'is-checked' class after model value is changed
- .list-row with checked input should have a 'is-checked' class after listbox value is changed
check dynamic html attributes
check listbox input/wrapper attributes
✓ wrapper should have data-* attribute
✓ input should have data-* attribute
check combobox input/wrapper attributes
✓ wrapper should have data-* attribute
- input should have data-* attribute
check non-specific attributes
✓ input should have data-* attribute
fieldCleave.vue
check template
✓ should contain an masked input element
✓ should contain the value
✓ input value should be the model value after changed
✓ model value should be the input value if changed
✓ should be formatted data in model
check optional attribute
✓ should set autocomplete
✓ should set disabled
✓ should set readonly
✓ should set inputName
fieldDateTimePicker.vue
check template
Bootstrap datetimepicker library is missing. Please download from https://eonasdan.github.io/bootstrap-datetimepicker/ and load the script and CSS in the HTML head section!
✓ should contain an input text element
✓ should contain the value
✓ input value should be the model value after changed
✓ model value should be the input value if changed
check optional attribute
✓ should set autocomplete
✓ should set disabled
✓ should set placeholder
✓ should set readonly
✓ should set inputName
check YYYYMMDD format
- should contain the value
Bootstrap datetimepicker library is missing. Please download from https://eonasdan.github.io/bootstrap-datetimepicker/ and load the script and CSS in the HTML head section!
✓ model value should be the formatted input value if changed
fieldGoogleAddress.vue
check template
Google Maps API is missing. Please add https://maps.googleapis.com/maps/api/js?key=YOUR_KEY&libraries=places script in the HTML head section!
✓ should contain an input text element
✓ should contain the value
✓ input value should be the model value after changed
✓ model value should be the input value if changed
check optional attribute
✓ should set autocomplete
✓ should set disabled
✓ should set placeholder
✓ should set readonly
✓ should set inputName
fieldImage.vue
check template without preview
✓ should contain an input text element
✓ should contain a file input element
✓ should not visible the preview div
✓ should contain the value
✓ input value should be the model value after changed
✓ model value should be the input value if changed
✓ should not contain a file input element if browse is false
✓ should not visible the preview div
✓ should not show the link input element if hideInput is true
✓ should not show base64 data in input field
✓ should clear input if press remove icon
- should convert image to base64 if file input changed
check optional attribute on text input
✓ should set autocomplete
✓ should set disabled
✓ should set placeholder
✓ should set readonly
✓ should set inputName
check optional attribute on file input
✓ should set disabled
✓ should set inputName
fieldInput.vue
check template
✓ should contain an input text element
✓ should contain the value
✓ input value should be the model value after changed
✓ model value should be the input value if changed
✓ should have 2 classes
change type of input
✓ should become a text
check optional attribute
✓ should set autocomplete
✓ should set disabled
✓ should set placeholder
✓ should set readonly
✓ should set inputName
change type of input
✓ should become a password
check optional attribute
✓ should set autocomplete
✓ should set disabled
✓ should set placeholder
✓ should set readonly
✓ should set inputName
change type of input
✓ should become a number
check optional attribute
✓ should set autocomplete
✓ should set disabled
✓ should set placeholder
✓ should set readonly
✓ should set inputName
change type of input
✓ should become a email
check optional attribute
✓ should set autocomplete
✓ should set disabled
✓ should set placeholder
✓ should set readonly
✓ should set inputName
change type of input
✓ should become a url
check optional attribute
✓ should set autocomplete
✓ should set disabled
✓ should set placeholder
✓ should set readonly
✓ should set inputName
change type of input
✓ should become a tel
check optional attribute
✓ should set autocomplete
✓ should set disabled
✓ should set placeholder
✓ should set readonly
✓ should set inputName
check dynamic html attributes
check input/wrapper attributes
✓ wrapper should have data-toggle attribute
✓ input should have data-toggle attribute
check non-specific attributes
✓ input should have data-toggle attribute
fieldLabel.vue
check template
✓ should contain a span element
✓ should contain the value
✓ input value should be the model value after changed
✓ should have 2 classes
check dynamic html attributes
check label attributes
✓ label should have data-* attribute
check non-specific attributes
✓ label should have data-* attribute
fieldMasked.vue
check template
JQuery MaskedInput library is missing. Please download from https://github.com/digitalBush/jquery.maskedinput and load the script in the HTML head section!
✓ should contain an masked input element
✓ should contain the value
✓ input value should be the model value after changed
✓ model value should be the input value if changed
- should be formatted data in model
check optional attribute
✓ should set autocomplete
✓ should set disabled
✓ should set placeholder
✓ should set readonly
✓ should set inputName
fieldNoUiSlider.vue
check template
✓ should contain a div element
✓ should contain an handle element
✓ should contain the value
✓ handle value should be the model value after changed
- model value should be the handle value after changed
✓ should set disabled
fieldPikaday.vue
check template
✓ should contain an input text element
✓ should contain the value
✓ input value should be the model value after changed
- model value should be the input value if changed
check optional attribute
✓ should set autocomplete
✓ should set disabled
✓ should set placeholder
✓ should set readonly
✓ should set inputName
FieldRadios.vue
check template with static string array
✓ should contain a checkbox element
✓ should contain 7 items
✓ should checked the values
✓ label with checked input should have a 'is-checked' class
✓ should have 2 classes
test values reactivity to changes
✓ radioList value should be the model value after changed
✓ model value should be the radioList value if changed
test 'is-checked' class attribution reactivity to changes
✓ label with checked input should have a 'is-checked' class after model value is changed
✓ label with checked input should have a 'is-checked' class after radioList value is changed
check static values with { value, name } objects (default key name)
✓ should contain a checkbox element
✓ should contain 7 items
✓ should checked the values
✓ label with checked input should have a 'is-checked' class
test values reactivity to changes
✓ radioList value should be the model value after changed
✓ model value should be the radioList value if changed
test 'is-checked' class attribution reactivity to changes
✓ label with checked input should have a 'is-checked' class after model value is changed
✓ label with checked input should have a 'is-checked' class after radioList value is changed
check static values with { id, label } objects (custom key name with `radiosOptions`)
✓ should contain a checkbox element
✓ should contain 7 items
✓ should checked the values
✓ label with checked input should have a 'is-checked' class
test values reactivity to changes
✓ radioList value should be the model value after changed
✓ model value should be the radioList value if changed
test 'is-checked' class attribution reactivity to changes
✓ label with checked input should have a 'is-checked' class after model value is changed
✓ label with checked input should have a 'is-checked' class after radioList value is changed
fieldRangeSlider.vue
check template
ion.rangeSlider library is missing. Please download from https://github.com/IonDen/ion.rangeSlider and load the script and CSS in the HTML head section!
✓ should contain an input text element
- should contain the value
- input value should be the model value after changed
- model value should be the input value if changed
check optional attribute
✓ should set autocomplete
✓ should set placeholder
✓ should set readonly
✓ should set inputName
fieldSelect.vue
check template
✓ should contain a select element
✓ should contain option elements
✓ should contain a <non selected> element
✓ should contain the value
✓ input value should be the model value after changed
✓ model value should be the input value if changed
✓ should contain a disabled <non selected> element if required
✓ should show the customized <non selected> text
✓ should hide the customized <non selected> text
check optional attribute
✓ should set disabled
✓ should set inputName
check static values with { id, name } objects
✓ should contain option elements
✓ should contain optgroup elements
✓ should contain option elements in optgroup
✓ should contain the value
✓ input value should be the model value after changed
✓ model value should be the input value if changed
check function values
✓ should contain the value
✓ input value should be the model value after changed
✓ model value should be the input value if changed
✓ should have 2 classes
check dynamic html attributes
check input/wrapper attributes
✓ input should have data-toggle attribute
check non-specific attributes
✓ input should have data-toggle attribute
fieldSelectEx.vue
check template
TypeError: Cannot read property 'selectpicker' of undefined
at VueComponent.<anonymous> (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/fieldSelectEx.vue:67:1)
at Array.<anonymous> (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:1835:12)
at flushCallbacks (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:1756:14)
at <anonymous>
TypeError: Cannot read property 'selectpicker' of undefined
at VueComponent.<anonymous> (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/fieldSelectEx.vue:67:1)
at Array.<anonymous> (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:1835:12)
at flushCallbacks (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:1756:14)
at <anonymous>
✓ should contain a select element
✓ should contain option elements
✓ should contain a <non selected> element
✓ should contain the value
TypeError: Cannot read property 'selectpicker' of undefined
at VueComponent.model (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/fieldSelectEx.vue:61:1)
at Watcher.run (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:3231:19)
at ./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4040:15
at Array.forEach (<anonymous>)
at VueComponent.update (./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4039:20)
at Context.<anonymous> (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/test/unit/specs/fields/fieldSelectEx.spec.js:77:1)
at callFn (./vue-form-generator/node_modules/mocha/lib/runnable.js:372:21)
at Test.Runnable.run (./vue-form-generator/node_modules/mocha/lib/runnable.js:364:7)
at Runner.runTest (./vue-form-generator/node_modules/mocha/lib/runner.js:455:10)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:573:12
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:369:14)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:379:7
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:303:14)
at Immediate.<anonymous> (./vue-form-generator/node_modules/mocha/lib/runner.js:347:5)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
TypeError: Cannot read property 'selectpicker' of undefined
at VueComponent.model (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/fieldSelectEx.vue:61:1)
at Watcher.run (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:3231:19)
at ./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4040:15
at Array.forEach (<anonymous>)
at VueComponent.update (./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4039:20)
at Context.<anonymous> (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/test/unit/specs/fields/fieldSelectEx.spec.js:77:1)
at callFn (./vue-form-generator/node_modules/mocha/lib/runnable.js:372:21)
at Test.Runnable.run (./vue-form-generator/node_modules/mocha/lib/runnable.js:364:7)
at Runner.runTest (./vue-form-generator/node_modules/mocha/lib/runner.js:455:10)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:573:12
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:369:14)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:379:7
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:303:14)
at Immediate.<anonymous> (./vue-form-generator/node_modules/mocha/lib/runner.js:347:5)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
✓ input value should be the model value after changed (54ms)
TypeError: Cannot read property 'selectpicker' of undefined
at VueComponent.model (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/fieldSelectEx.vue:61:1)
at Watcher.run (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:3231:19)
at ./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4040:15
at Array.forEach (<anonymous>)
at VueComponent.update (./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4039:20)
at Wrapper.trigger (./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:1422:8)
at Context.<anonymous> (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/test/unit/specs/fields/fieldSelectEx.spec.js:84:1)
at callFn (./vue-form-generator/node_modules/mocha/lib/runnable.js:372:21)
at Test.Runnable.run (./vue-form-generator/node_modules/mocha/lib/runnable.js:364:7)
at Runner.runTest (./vue-form-generator/node_modules/mocha/lib/runner.js:455:10)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:573:12
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:369:14)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:379:7
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:303:14)
at Immediate.<anonymous> (./vue-form-generator/node_modules/mocha/lib/runner.js:347:5)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
TypeError: Cannot read property 'selectpicker' of undefined
at VueComponent.model (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/fieldSelectEx.vue:61:1)
at Watcher.run (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:3231:19)
at ./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4040:15
at Array.forEach (<anonymous>)
at VueComponent.update (./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4039:20)
at Wrapper.trigger (./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:1422:8)
at Context.<anonymous> (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/test/unit/specs/fields/fieldSelectEx.spec.js:84:1)
at callFn (./vue-form-generator/node_modules/mocha/lib/runnable.js:372:21)
at Test.Runnable.run (./vue-form-generator/node_modules/mocha/lib/runnable.js:364:7)
at Runner.runTest (./vue-form-generator/node_modules/mocha/lib/runner.js:455:10)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:573:12
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:369:14)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:379:7
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:303:14)
at Immediate.<anonymous> (./vue-form-generator/node_modules/mocha/lib/runner.js:347:5)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
✓ model value should be the input value if changed
- should not be multiple
check optional attribute
✓ should set disabled
✓ should set multiSelect
✓ should set inputName
check static values with { id, name } objects
- should contain option elements
- should contain the value
TypeError: Cannot read property 'selectpicker' of undefined
at VueComponent.<anonymous> (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/fieldSelectEx.vue:67:1)
at Array.<anonymous> (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:1835:12)
at flushCallbacks (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:1756:14)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
TypeError: Cannot read property 'selectpicker' of undefined
at VueComponent.<anonymous> (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/fieldSelectEx.vue:67:1)
at Array.<anonymous> (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:1835:12)
at flushCallbacks (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:1756:14)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
TypeError: Cannot read property 'selectpicker' of undefined
at VueComponent.model (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/fieldSelectEx.vue:61:1)
at Watcher.run (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:3231:19)
at ./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4040:15
at Array.forEach (<anonymous>)
at VueComponent.update (./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4039:20)
at Context.<anonymous> (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/test/unit/specs/fields/fieldSelectEx.spec.js:140:1)
at callFn (./vue-form-generator/node_modules/mocha/lib/runnable.js:372:21)
at Test.Runnable.run (./vue-form-generator/node_modules/mocha/lib/runnable.js:364:7)
at Runner.runTest (./vue-form-generator/node_modules/mocha/lib/runner.js:455:10)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:573:12
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:369:14)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:379:7
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:303:14)
at Immediate.<anonymous> (./vue-form-generator/node_modules/mocha/lib/runner.js:347:5)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
TypeError: Cannot read property 'selectpicker' of undefined
at VueComponent.model (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/fieldSelectEx.vue:61:1)
at Watcher.run (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:3231:19)
at ./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4040:15
at Array.forEach (<anonymous>)
at VueComponent.update (./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4039:20)
at Context.<anonymous> (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/test/unit/specs/fields/fieldSelectEx.spec.js:140:1)
at callFn (./vue-form-generator/node_modules/mocha/lib/runnable.js:372:21)
at Test.Runnable.run (./vue-form-generator/node_modules/mocha/lib/runnable.js:364:7)
at Runner.runTest (./vue-form-generator/node_modules/mocha/lib/runner.js:455:10)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:573:12
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:369:14)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:379:7
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:303:14)
at Immediate.<anonymous> (./vue-form-generator/node_modules/mocha/lib/runner.js:347:5)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
✓ input value should be the model value after changed
TypeError: Cannot read property 'selectpicker' of undefined
at VueComponent.model (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/fieldSelectEx.vue:61:1)
at Watcher.run (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:3231:19)
at ./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4040:15
at Array.forEach (<anonymous>)
at VueComponent.update (./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4039:20)
at Wrapper.trigger (./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:1422:8)
at Context.<anonymous> (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/test/unit/specs/fields/fieldSelectEx.spec.js:147:1)
at callFn (./vue-form-generator/node_modules/mocha/lib/runnable.js:372:21)
at Test.Runnable.run (./vue-form-generator/node_modules/mocha/lib/runnable.js:364:7)
at Runner.runTest (./vue-form-generator/node_modules/mocha/lib/runner.js:455:10)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:573:12
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:369:14)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:379:7
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:303:14)
at Immediate.<anonymous> (./vue-form-generator/node_modules/mocha/lib/runner.js:347:5)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
TypeError: Cannot read property 'selectpicker' of undefined
at VueComponent.model (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/fieldSelectEx.vue:61:1)
at Watcher.run (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:3231:19)
at ./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4040:15
at Array.forEach (<anonymous>)
at VueComponent.update (./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4039:20)
at Wrapper.trigger (./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:1422:8)
at Context.<anonymous> (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/test/unit/specs/fields/fieldSelectEx.spec.js:147:1)
at callFn (./vue-form-generator/node_modules/mocha/lib/runnable.js:372:21)
at Test.Runnable.run (./vue-form-generator/node_modules/mocha/lib/runnable.js:364:7)
at Runner.runTest (./vue-form-generator/node_modules/mocha/lib/runner.js:455:10)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:573:12
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:369:14)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:379:7
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:303:14)
at Immediate.<anonymous> (./vue-form-generator/node_modules/mocha/lib/runner.js:347:5)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
✓ model value should be the input value if changed
check function values
TypeError: Cannot read property 'selectpicker' of undefined
at VueComponent.model (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/fieldSelectEx.vue:61:1)
at Watcher.run (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:3231:19)
at ./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4040:15
at Array.forEach (<anonymous>)
at VueComponent.update (./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4039:20)
at Context.<anonymous> (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/test/unit/specs/fields/fieldSelectEx.spec.js:171:1)
at callFn (./vue-form-generator/node_modules/mocha/lib/runnable.js:372:21)
at Hook.Runnable.run (./vue-form-generator/node_modules/mocha/lib/runnable.js:364:7)
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:317:10)
at Immediate.<anonymous> (./vue-form-generator/node_modules/mocha/lib/runner.js:347:5)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
TypeError: Cannot read property 'selectpicker' of undefined
at VueComponent.model (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/fieldSelectEx.vue:61:1)
at Watcher.run (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:3231:19)
at ./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4040:15
at Array.forEach (<anonymous>)
at VueComponent.update (./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4039:20)
at Context.<anonymous> (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/test/unit/specs/fields/fieldSelectEx.spec.js:171:1)
at callFn (./vue-form-generator/node_modules/mocha/lib/runnable.js:372:21)
at Hook.Runnable.run (./vue-form-generator/node_modules/mocha/lib/runnable.js:364:7)
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:317:10)
at Immediate.<anonymous> (./vue-form-generator/node_modules/mocha/lib/runner.js:347:5)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
- should contain the value
TypeError: Cannot read property 'selectpicker' of undefined
at VueComponent.<anonymous> (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/fieldSelectEx.vue:67:1)
at Array.<anonymous> (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:1835:12)
at flushCallbacks (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:1756:14)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
TypeError: Cannot read property 'selectpicker' of undefined
at VueComponent.<anonymous> (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/fieldSelectEx.vue:67:1)
at Array.<anonymous> (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:1835:12)
at flushCallbacks (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:1756:14)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
TypeError: Cannot read property 'selectpicker' of undefined
at VueComponent.model (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/fieldSelectEx.vue:61:1)
at Watcher.run (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:3231:19)
at ./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4040:15
at Array.forEach (<anonymous>)
at VueComponent.update (./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4039:20)
at Context.<anonymous> (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/test/unit/specs/fields/fieldSelectEx.spec.js:180:1)
at callFn (./vue-form-generator/node_modules/mocha/lib/runnable.js:372:21)
at Test.Runnable.run (./vue-form-generator/node_modules/mocha/lib/runnable.js:364:7)
at Runner.runTest (./vue-form-generator/node_modules/mocha/lib/runner.js:455:10)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:573:12
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:369:14)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:379:7
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:303:14)
at Immediate.<anonymous> (./vue-form-generator/node_modules/mocha/lib/runner.js:347:5)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
TypeError: Cannot read property 'selectpicker' of undefined
at VueComponent.model (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/fieldSelectEx.vue:61:1)
at Watcher.run (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:3231:19)
at ./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4040:15
at Array.forEach (<anonymous>)
at VueComponent.update (./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4039:20)
at Context.<anonymous> (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/test/unit/specs/fields/fieldSelectEx.spec.js:180:1)
at callFn (./vue-form-generator/node_modules/mocha/lib/runnable.js:372:21)
at Test.Runnable.run (./vue-form-generator/node_modules/mocha/lib/runnable.js:364:7)
at Runner.runTest (./vue-form-generator/node_modules/mocha/lib/runner.js:455:10)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:573:12
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:369:14)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:379:7
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:303:14)
at Immediate.<anonymous> (./vue-form-generator/node_modules/mocha/lib/runner.js:347:5)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
✓ input value should be the model value after changed
TypeError: Cannot read property 'selectpicker' of undefined
at VueComponent.model (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/fieldSelectEx.vue:61:1)
at Watcher.run (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:3231:19)
at ./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4040:15
at Array.forEach (<anonymous>)
at VueComponent.update (./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4039:20)
at Wrapper.trigger (./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:1422:8)
at Context.<anonymous> (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/test/unit/specs/fields/fieldSelectEx.spec.js:186:1)
at callFn (./vue-form-generator/node_modules/mocha/lib/runnable.js:372:21)
at Test.Runnable.run (./vue-form-generator/node_modules/mocha/lib/runnable.js:364:7)
at Runner.runTest (./vue-form-generator/node_modules/mocha/lib/runner.js:455:10)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:573:12
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:369:14)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:379:7
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:303:14)
at Immediate.<anonymous> (./vue-form-generator/node_modules/mocha/lib/runner.js:347:5)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
TypeError: Cannot read property 'selectpicker' of undefined
at VueComponent.model (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/fieldSelectEx.vue:61:1)
at Watcher.run (./vue-form-generator/node_modules/vue/dist/vue.runtime.common.js:3231:19)
at ./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4040:15
at Array.forEach (<anonymous>)
at VueComponent.update (./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:4039:20)
at Wrapper.trigger (./vue-form-generator/node_modules/@vue/test-utils/dist/vue-test-utils.js:1422:8)
at Context.<anonymous> (./vue-form-generator/.tmp/mocha-webpack/1530108416672/webpack:/test/unit/specs/fields/fieldSelectEx.spec.js:186:1)
at callFn (./vue-form-generator/node_modules/mocha/lib/runnable.js:372:21)
at Test.Runnable.run (./vue-form-generator/node_modules/mocha/lib/runnable.js:364:7)
at Runner.runTest (./vue-form-generator/node_modules/mocha/lib/runner.js:455:10)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:573:12
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:369:14)
at ./vue-form-generator/node_modules/mocha/lib/runner.js:379:7
at next (./vue-form-generator/node_modules/mocha/lib/runner.js:303:14)
at Immediate.<anonymous> (./vue-form-generator/node_modules/mocha/lib/runner.js:347:5)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
✓ model value should be the input value if changed
fieldSpectrum.vue
check template
Spectrum color library is missing. Please download from http://bgrins.github.io/spectrum/ and load the script and CSS in the HTML head section!
✓ should contain an input color element
- should contain the value
- input value should be the model value after changed
- model value should be the input value if changed
check optional attribute
✓ should set autocomplete
✓ should set disabled
✓ should set placeholder
✓ should set readonly
✓ should set inputName
fieldStaticMap.vue
check template
✓ should contain an img element
fieldSubmit.vue
check template
✓ should contain an input submit element
✓ should have 2 classes
valid form
- should not call validate if validateBeforeSubmit is false
- should call validate if validateBeforeSubmit is true
invalid form
- should not call onSubmit if validateBeforeSubmit is true
check optional attribute
✓ should set inputName
FieldSwitch.vue
check template
✓ should contain a checkbox element
✓ should contain the value
✓ should contain the default On/Off texts
✓ should set disabled
✓ input value should be the model value after changed
✓ model value should be the input value if changed
check optional attribute
✓ should set autocomplete
✓ should set disabled
✓ should set inputName
check template with custom On/Off texts
✓ check attributes
check template with custom On/Off values
✓ check input value
✓ input value should be the model value after changed
✓ model value should be the input value if changed
fieldTextArea.vue
check template
✓ should contain a textarea element
✓ should change rows to 4
✓ should contain the value
✓ input value should be the model value after changed
✓ model value should be the input value if changed
✓ should have 2 classes
check optional attribute
✓ should set disabled
✓ should set placeholder
✓ should set readonly
✓ should set inputName
fieldUpload.vue
check template
✓ should contain an input text element
check optional attribute
✓ should set disabled
✓ should set placeholder
✓ should set readonly
✓ should set name
✓ should set required
✓ should set multiple
✓ should set accept
fieldVueMultiSelect.vue
check template
✓ should contain a select element
✓ should contain option elements
✓ should set disabled
✓ input value should be the model value after changed
✓ input value should be the model value after changed (multiselection)
✓ model value should be the input value if changed
with objects
✓ model value should work with objects
✓ options should contain only text specified in label
✓ options should contain custom text specified in customLabel
SchemaUtils
test createDefaultObject function
✓ create default object by schema
test getMultipleFields function
✓ collect fields from schema where multi is true
test mergeMultiObjectFields function
✓ create merged model from multiple objects #1
✓ create merged model from multiple objects #2
✓ create merged model from cloned objects
Validators
test Validators.required
✓ should NOT give error if value is null, but field is NOT required
✓ should give error if value is null, but field is required
test Validators.number
✓ should give error if value is null, but field is required
✓ should give error if value is smaller than min
✓ should give error if value is greater than max
✓ should not give error
✓ should give error if value is string
✓ should not give error if value is null and field is not required
test Validators.integer
✓ should give error if value is not integer
✓ should not give error if value is integer
test Validators.double
✓ should give error if value is not double
✓ should not give error if value is double
test Validators.string
✓ should give error if value is null, but field is required
✓ should give error if value is smaller than min
✓ should give error if value is greater than max
✓ should give error if value is not string
✓ should not give error
✓ should not give error if value is null and field is not required
test Validators.array
✓ should give error if value is null, but field is required
✓ should give error if count of items is smaller than min
✓ should give error if count of items is greater than max
✓ should give error if value is not array
✓ should not give error
✓ should not give error if value is null and field is not required
✓ should give error if count of item is smaller than minimum and field is not required
test Validators.date
✓ should give error if value is null, but field is required
✓ should not give error
✓ should give error if value is smaller than min
✓ should give error if value is greater than max
✓ should give error if value is not a date
✓ should not give error if value is null and field is not required
test Validators.regexp
✓ should give error if value is null, but field is required
✓ should give error if value is not matched the pattern
✓ should not give error
✓ should not give error if value is null and field is not required
test Validators.email
✓ should give error if value is null, but field is required
✓ should give error if value is not matched the pattern
✓ should not give error
✓ should not give error if value is null and field is not required
test Validators.url
✓ should give error if value is null, but field is required
✓ should give error if value is not matched the pattern
✓ should not give error
✓ should not give error if value is null and field is not required
test Validators.creditCard
✓ should give error if value is null, but field is required
✓ should give error if value is not matched the pattern
✓ should not give error
✓ should not give error if value is null and field is not required
test Validators.alpha
✓ should give error if value is null, but field is required
✓ should give error if value is not alpha
✓ should not give error
✓ should not give error if value is null and field is not required
test Validators.alphaNumeric
✓ should give error if value is null, but field is required
✓ should give error if value is not alphaNumeric
✓ should not give error
✓ should not give error if value is null and field is not required
test localized error messages
✓ should give the default error message
✓ should give the localized error message
test local custom error messages
✓ should give the custom error message
✓ should give the default error message
381 passing (1s)
23 pending
MOCHA Tests completed successfully
-------------------------------------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
-------------------------------------|----------|----------|----------|----------|-------------------|
All files | 73.74 | 63.82 | 76.09 | 73.53 | |
fields | 85 | 72.13 | 87.5 | 84.85 | |
abstractField.js | 85 | 72.13 | 87.5 | 84.85 |... 39,140,145,167 |
fields/core/src/fields/core | 65.28 | 57.6 | 33.33 | 65.28 | |
fieldChecklist.vue | 91.43 | 90.91 | 100 | 91.43 | 66,81,95 |
fieldInput.vue | 27.27 | 7.69 | 0 | 27.27 |... 30,132,140,146 |
fieldRadios.vue | 86.36 | 83.33 | 100 | 86.36 | 20,39,54 |
fieldSelect.vue | 87.18 | 78.13 | 100 | 87.18 |96,102,108,119,124 |
fieldSubmit.vue | 0 | 0 | 0 | 0 |... 27,28,30,32,35 |
fieldUpload.vue | 0 | 0 | 100 | 0 | 25,27 |
fields/optional/src/fields/optional | 53.54 | 43.43 | 66.67 | 53.37 | |
fieldCleave.vue | 53.85 | 50 | 100 | 53.85 | 54,57,64,69,70,71 |
fieldDateTimePicker.vue | 58.33 | 42.86 | 50 | 54.55 | 31,32,39,50,51 |
fieldGoogleAddress.vue | 18.18 | 12.5 | 50 | 18.18 |... 8,89,90,95,100 |
fieldImage.vue | 70.59 | 66.67 | 0 | 68.75 | 57,58,59,62,63 |
fieldMasked.vue | 60 | 33.33 | 100 | 60 | 15,27 |
fieldNoUiSlider.vue | 57.69 | 51.61 | 100 | 57.69 |... 55,61,64,88,96 |
fieldPikaday.vue | 63.64 | 50 | 50 | 70 | 34,40,46 |
fieldRangeSlider.vue | 20 | 10 | 50 | 20 |... 54,55,57,62,72 |
fieldSelectEx.vue | 70.83 | 50 | 100 | 70.83 |... 45,50,68,72,80 |
fieldSpectrum.vue | 30.77 | 12.5 | 50 | 33.33 |... 27,34,44,48,56 |
fieldStaticMap.vue | 100 | 70 | 100 | 100 | 14,16,35 |
fieldSwitch.vue | 85.71 | 87.5 | 100 | 83.33 | 24 |
fieldVueMultiSelect.vue | 52.94 | 53.33 | 100 | 52.94 |... 5,89,90,91,110 |
utils | 97.14 | 91.61 | 100 | 98.14 | |
dateFieldHelper.js | 90 | 75 | 100 | 90 | 10 |
schema.js | 97.22 | 84 | 100 | 97.14 | 59 |
validators.js | 97.67 | 94.26 | 100 | 99.14 | 153 |
-------------------------------------|----------|----------|----------|----------|-------------------|