Commit b99f2bf2 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'xanf-vtu-30-model-update-event' into 'master'

Use proper model update event in test

Closes #191268

See merge request gitlab-org/gitlab!22297
parents ea7ddca0 de793d75
...@@ -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