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', () => {
it(`${elementName} form element change updated ${modelName} with ${value}`, () => {
const element = findFormElements(elementName, formGroup);
element.vm.$emit('input', value);
expect(wrapper.vm[modelName]).toBe(value);
const modelUpdateEvent = element.vm.$options.model
? 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