mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 09:22:34 +00:00
chore: formatting
This commit is contained in:
parent
8c58ad2a2b
commit
9d9ab2667e
1 changed files with 13 additions and 13 deletions
|
@ -11,17 +11,17 @@ describe('Tree.vue', () => {
|
||||||
props: {
|
props: {
|
||||||
value: [
|
value: [
|
||||||
{
|
{
|
||||||
key: "0",
|
key: '0',
|
||||||
label: "Documents",
|
label: 'Documents',
|
||||||
data: "Documents Folder",
|
data: 'Documents Folder',
|
||||||
icon: "pi pi-fw pi-inbox",
|
icon: 'pi pi-fw pi-inbox',
|
||||||
children: [],
|
children: []
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
slots: {
|
slots: {
|
||||||
default: `<input data-tree-input />`
|
default: `<input data-tree-input />`
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -30,16 +30,16 @@ describe('Tree.vue', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('triggers event', async () => {
|
it('triggers event', async () => {
|
||||||
wrapper.trigger('keydown.space')
|
wrapper.trigger('keydown.space');
|
||||||
expect(wrapper.emitted('keydown')).toBeTruthy()
|
expect(wrapper.emitted('keydown')).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('stops event propagation from content', async () => {
|
it('stops event propagation from content', async () => {
|
||||||
// If the event propagation is not stopped from content, then inputs would not work as expected
|
// 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…
Add table
Add a link
Reference in a new issue