[new feature] Popup: add click event
This commit is contained in:
@@ -171,10 +171,21 @@ test('close on click modal', () => {
|
||||
expect(wrapper.vm.value).toBeFalsy();
|
||||
});
|
||||
|
||||
test('oepn & close event', () => {
|
||||
wrapper = mount(Popup);
|
||||
test('open & close event', () => {
|
||||
const wrapper = mount(Popup);
|
||||
wrapper.vm.value = true;
|
||||
expect(wrapper.emitted('open')).toBeTruthy();
|
||||
wrapper.vm.value = false;
|
||||
expect(wrapper.emitted('close')).toBeTruthy();
|
||||
});
|
||||
|
||||
test('click event', () => {
|
||||
const wrapper = mount(Popup, {
|
||||
propsData: {
|
||||
value: true
|
||||
}
|
||||
});
|
||||
|
||||
wrapper.trigger('click');
|
||||
expect(wrapper.emitted('click')).toBeTruthy();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user