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.
> [email protected] pretest ./vue-form-generator
> npm run lint
> [email protected] lint ./vue-form-generator
> eslint --ext=.js,.vue src test/unit/specs
> [email protected] test ./vue-form-generator
> npm run unit
> [email protected] unit ./vue-form-generator
> cross-env NODE_ENV=test nyc npm run mocha
> [email protected] 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 |
-------------------------------------|----------|----------|----------|----------|-------------------|
@lionel-bijaoui I just ran into an interesting issue. I merged the updates and tried to use them in my current project and started getting an error.
Here's what I'm doing (it's a bit odd, perhaps).
import { component as VueFormGenerator } from 'vue-form-generator';
With that import statement, I then use
mixins: [ VueFormGenerator.components['fieldInput'] ],
This let's me use fieldInput.vue instead of abstractField.vue as my base class for a custom field.
The updates in this PR broke this, as the formGenerator.vue file no longer exposes any of the field components.
Think we can work on a way of exposing all of the core fields so they can be used as base classes for custom fields?
@zoul0813 Ok, so, the thing is for the v3, VFG will not be bundled with fields at all (maybe a tool will allow for easy bundle making, but this is for later).
So, I started to test a config/repo for the future individual fields (https://github.com/vue-generators/vfg-field-checkbox <-- not functional right now).
If you want to help me extract the fields into their own repo, you could just npm i the field you want and do the same thing you do here (just a wild guess).
To be honest, this is not a way to use field that I was aware of, so your use case was not in my mind when I was working on it.
I'm sorry that it break you system and that I have no real solution π
EDIT: I have a temporary solution for you, I understand why it is not working
@zoul0813 #476
Again, you should find another way to do this, as fields will be "independent" in the next version
No fields at all, including the "core" standard fields such as Input, Select, Checkbox, etc? I think VFG should come with the core fields, but not the optional ones.
And yeah, I'm aware that my use case was unique and was a hack.
I got it working, I just updated the code to access the formGroup component exposed by formGenerator, then grabbed the fieldInput from the formGroup's exposed components.
I just think that any stock fields should be publicly exposed, so they can be used as base classes ... similar to abstractField.vue.
No core at all, just the engine.
That will allow for a lighter lib (no useless bloat), force us to make a great API for fields (all fields are then equal in functionality), detach generator issues from fields issues (more focused issues) and version number get a lot more meaning.
Also, we are not the one drawing the line in the sand about what constitute "core" or not. It's everyone choice.
Of course, we could provide a special version (pack ?) with some fields that install in bulk, but i would prefer a tool to build pack, or even better build schema with a GUI (CLI also ?).
This is my vision for the future of VFG. I understand that this is a big change from the current system, but if you look at other lib (babel for example), it doesn't seem so strange and start to make a lot of sense as to why take this approach.
Sounds good.
@lionel-bijaoui found a bug, the model-updated event isn't being fired properly, it was moved into the formGroup and isn't being emitted from within formGenerator ...
I'm submitting a PR to fix that, and then afterwards ... I think v2.3.0 is good to be released?
yes
I'm wondering when the v2.3.0 will be released? I'd like to make use of the recently introduced html in labels, it's going to help me out no end.
@lionel-bijaoui Travis is still failing, I can't reproduce this failure on my box ... can you?
The error that travis is reporting seems to be caused by babel-eslint from what I can tell - https://github.com/babel/babel-eslint/issues/530
Has there been any further progress with this issue? Anything I could do to help?
Yes, I managed to fix the issue in the v3 branch (#481). A mix of yarn and npm version.
Excellent! Does this mean waiting for v3, or will the fixes from the v3 branch be carried over to master to allow 2.3 to be released?
I will try to fix Travis in 2.3
Apologies, Iβve been stuck in production release mode on my latest project and havenβt had time to work on VFG... will hopefully be getting back to VFG in the next week or two as my next project will rely heavily on it.
@lionel-bijaoui did you make any headway fixing Travis in 2.3?
@tomdickie no yet, I'm on holidays
@tomdickie @zoul0813 Travis is fixed in v2 branch
Excellent news, thanks for the update @lionel-bijaoui will that change ultimately make its way to the npm module?
I don't know how to create a full release (npm and all), but I think @zoul0813 know how to.
I guess soon ?
I'm still working on the v3 with the little time I have on my hands for it.
Sorry guys, I've been busy with work the past few weeks. I merged all of the latest stuff into my fork yesterday and am testing it now. If all goes well, I'll make a PR and get 2.3.0 out ASAP.
Been a while, but assuming I did everything correctly ... npm should have v2.3.0 available shortly.
NPM still show 2.2.2 as latest. How long is it supposed to take?
All done - there was an issue with the CI script.
@zoul0813 I was checking 2.3.0 and notice you did not add new dist files in the commit, is this normal ?
EDIT: I can add them in #498 and then you can release a 2.3.1 ?
Travis doesnβt build those before it bundles for npmjs? I can add dist files with 2.3.1 tomorrow - yeah.
Most helpful comment
Apologies, Iβve been stuck in production release mode on my latest project and havenβt had time to work on VFG... will hopefully be getting back to VFG in the next week or two as my next project will rely heavily on it.