Commit de793d75 authored by Illya Klymov's avatar Illya Klymov

Use proper model update events in test

parent 13adffbc
...@@ -82,8 +82,13 @@ describe('Settings Form', () => { ...@@ -82,8 +82,13 @@ describe('Settings Form', () => {
it(`${elementName} form element change updated ${modelName} with ${value}`, () => { it(`${elementName} form element change updated ${modelName} with ${value}`, () => {
const element = findFormElements(elementName, formGroup); const element = findFormElements(elementName, formGroup);
element.vm.$emit('input', value); const modelUpdateEvent = element.vm.$options.model
expect(wrapper.vm[modelName]).toBe(value); ? element.vm.$options.model.event
: 'input';
element.vm.$emit(modelUpdateEvent, value);
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.vm[modelName]).toBe(value);
});
}); });
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment