mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 17:32:36 +00:00
- confugure vitest
- TreeButton.spec, Tree.spec update tests
This commit is contained in:
parent
706e623506
commit
71d6789db8
4 changed files with 24 additions and 13 deletions
|
@ -16,7 +16,7 @@ describe('ToggleButton', () => {
|
|||
|
||||
it('is ToggleButton exist', () => {
|
||||
expect(wrapper.find('.p-togglebutton.p-component').exists()).toBe(true);
|
||||
expect(wrapper.find('span.pi-times.p-button-icon').exists()).toBe(true);
|
||||
expect(wrapper.find('span.pi-times.p-togglebutton-icon').exists()).toBe(true);
|
||||
});
|
||||
|
||||
it('should have onIcon', async () => {
|
||||
|
@ -44,11 +44,11 @@ describe('ToggleButton', () => {
|
|||
style: 'width: 10em'
|
||||
});
|
||||
|
||||
expect(wrapper.find('.p-button-label').text()).toBe('I confirm');
|
||||
expect(wrapper.find('.p-togglebutton-label').text()).toBe('I confirm');
|
||||
expect(wrapper.attributes().style).toContain('width: 10em');
|
||||
|
||||
await wrapper.setProps({ modelValue: false });
|
||||
|
||||
expect(wrapper.find('.p-button-label').text()).toBe('I reject');
|
||||
expect(wrapper.find('.p-togglebutton-label').text()).toBe('I reject');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -48,7 +48,7 @@ describe('Tree.vue', () => {
|
|||
}
|
||||
});
|
||||
|
||||
let searchField = wrapper.find('input.p-tree-filter');
|
||||
let searchField = wrapper.find('input.p-inputtext');
|
||||
|
||||
await searchField.trigger('keydown.space');
|
||||
|
||||
|
@ -57,7 +57,7 @@ describe('Tree.vue', () => {
|
|||
|
||||
it('should render icon', ({ expect }) => {
|
||||
expect(wrapper.find('span.pi-inbox').exists()).toBeTruthy();
|
||||
expect(wrapper.find('span.pi-inbox').classes('p-treenode-icon')).toBeTruthy();
|
||||
expect(wrapper.find('span.pi-inbox').classes('p-tree-node-icon')).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should render icon slot', ({ expect }) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue