mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 17:02:38 +00:00
Fixed #3802 - Improve folder structure for nuxt configurations
This commit is contained in:
parent
851950270b
commit
f5fe822afb
563 changed files with 1703 additions and 1095 deletions
|
@ -1,56 +0,0 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import PrimeVue from 'primevue/config';
|
||||
import SplitButton from './SplitButton.vue';
|
||||
|
||||
describe('SplitButton.vue', () => {
|
||||
let wrapper;
|
||||
|
||||
beforeEach(async () => {
|
||||
wrapper = mount(SplitButton, {
|
||||
global: {
|
||||
plugins: [PrimeVue],
|
||||
stubs: {
|
||||
teleport: true,
|
||||
'router-link': true
|
||||
}
|
||||
},
|
||||
props: {
|
||||
label: 'Save',
|
||||
model: [
|
||||
{
|
||||
label: 'Update',
|
||||
icon: 'pi pi-refresh'
|
||||
},
|
||||
{
|
||||
label: 'Delete',
|
||||
icon: 'pi pi-times'
|
||||
},
|
||||
{
|
||||
label: 'Vue Website',
|
||||
icon: 'pi pi-external-link',
|
||||
command: () => {
|
||||
window.location.href = 'https://vuejs.org/';
|
||||
}
|
||||
},
|
||||
{ label: 'Upload', icon: 'pi pi-upload', to: '/fileupload' }
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
await wrapper.vm.onDropdownButtonClick();
|
||||
});
|
||||
|
||||
it('should exist', () => {
|
||||
expect(wrapper.find('.p-splitbutton.p-component').exists()).toBe(true);
|
||||
expect(wrapper.find('.p-tieredmenu.p-component').exists()).toBe(true);
|
||||
expect(wrapper.findAll('li.p-menuitem').length).toBe(4);
|
||||
expect(wrapper.find('.p-splitbutton-defaultbutton').exists()).toBe(true);
|
||||
expect(wrapper.find('.p-button-label').text()).toBe('Save');
|
||||
});
|
||||
|
||||
it('should hide when default button is clicked', async () => {
|
||||
await wrapper.vm.onDefaultButtonClick();
|
||||
|
||||
expect(wrapper.emitted()['click'][0]).toEqual([undefined]);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue