mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 08:52:34 +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,49 +0,0 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import Slider from './Slider.vue';
|
||||
|
||||
describe('Slider.vue', () => {
|
||||
let wrapper;
|
||||
|
||||
beforeEach(() => {
|
||||
wrapper = mount(Slider, {
|
||||
props: {
|
||||
modelValue: null
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it('should exist', () => {
|
||||
expect(wrapper.find('.p-slider.p-component').exists()).toBe(true);
|
||||
expect(wrapper.find('.p-slider').classes()).toContain('p-slider-horizontal');
|
||||
});
|
||||
|
||||
it('should drag start and end', async () => {
|
||||
await wrapper.vm.onDragStart({ preventDefault: () => {}, currentTarget: { focus: () => {} } });
|
||||
|
||||
expect(wrapper.find('.p-slider').classes()).toContain('p-slider-sliding');
|
||||
|
||||
await wrapper.vm.onDragEnd();
|
||||
|
||||
expect(wrapper.find('.p-slider').classes()).not.toContain('p-slider-sliding');
|
||||
});
|
||||
|
||||
it('should set value', async () => {
|
||||
wrapper.element.setAttribute('width', '14rem');
|
||||
|
||||
await wrapper.vm.updateDomData();
|
||||
|
||||
await wrapper.vm.setValue({ pageX: 60 }); // TODO:
|
||||
|
||||
expect(wrapper.emitted()['update:modelValue'][0][0]).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
it('should set value on vertical mode', async () => {
|
||||
await wrapper.setProps({ orientation: 'vertical', modelValue: 0 });
|
||||
|
||||
await wrapper.vm.updateDomData();
|
||||
|
||||
await wrapper.vm.setValue({ pageY: 111 }); // TODO:
|
||||
|
||||
expect(wrapper.emitted()['update:modelValue'][0][0]).toBe(0);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue