`
- },
- })
- await flushPromises()
- expect(wrapper.find('span').text()).toBe('the value was different than expected')
- })
-
- it('No validation on created when validationBehavior is not live', async () => {
- const wrapper = mount(FormularioInput, {
- propsData: {
- name: 'test',
- validation: 'required|in:abcdef',
- validationMessages: {in: 'the value was different than expected'},
- value: 'other value'
- },
- scopedSlots: {
- default: `
{{ error.message }}
`
- }
- })
- await flushPromises()
- expect(wrapper.find('span').exists()).toBe(false)
- })
-
- it('No validation on value change when validationBehavior is "submit"', async () => {
- const wrapper = mount(FormularioInput, {
- propsData: {
- name: 'test',
- validation: 'required|in:abcdef',
- validationMessages: {in: 'the value was different than expected'},
- validationBehavior: 'submit',
- value: 'Initial'
- },
- scopedSlots: {
- default: `