chore: formatting
parent
8c58ad2a2b
commit
9d9ab2667e
|
@ -11,17 +11,17 @@ describe('Tree.vue', () => {
|
|||
props: {
|
||||
value: [
|
||||
{
|
||||
key: "0",
|
||||
label: "Documents",
|
||||
data: "Documents Folder",
|
||||
icon: "pi pi-fw pi-inbox",
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
key: '0',
|
||||
label: 'Documents',
|
||||
data: 'Documents Folder',
|
||||
icon: 'pi pi-fw pi-inbox',
|
||||
children: []
|
||||
}
|
||||
]
|
||||
},
|
||||
slots: {
|
||||
default: `<input data-tree-input />`
|
||||
},
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -30,16 +30,16 @@ describe('Tree.vue', () => {
|
|||
});
|
||||
|
||||
it('triggers event', async () => {
|
||||
wrapper.trigger('keydown.space')
|
||||
expect(wrapper.emitted('keydown')).toBeTruthy()
|
||||
wrapper.trigger('keydown.space');
|
||||
expect(wrapper.emitted('keydown')).toBeTruthy();
|
||||
});
|
||||
|
||||
it('stops event propagation from content', async () => {
|
||||
// If the event propagation is not stopped from content, then inputs would not work as expected
|
||||
let textInput = wrapper.find('input[data-tree-input]')
|
||||
let textInput = wrapper.find('input[data-tree-input]');
|
||||
|
||||
await textInput.trigger('keydown.space')
|
||||
await textInput.trigger('keydown.space');
|
||||
|
||||
expect(wrapper.emitted('keydown')).toBeFalsy()
|
||||
expect(wrapper.emitted('keydown')).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue