2022-09-06 12:03:37 +00:00
|
|
|
import { mount } from '@vue/test-utils';
|
2022-12-08 11:04:25 +00:00
|
|
|
import PrimeVue from 'primevue/config';
|
2022-09-06 12:03:37 +00:00
|
|
|
import ScrollTop from './ScrollTop.vue';
|
|
|
|
|
|
|
|
describe('ScrollTop.vue', () => {
|
|
|
|
let wrapper;
|
|
|
|
|
|
|
|
beforeEach(() => {
|
2022-12-08 11:04:25 +00:00
|
|
|
wrapper = mount(ScrollTop, {
|
|
|
|
global: {
|
|
|
|
plugins: [PrimeVue],
|
|
|
|
stubs: {
|
|
|
|
transition: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
2022-09-06 12:03:37 +00:00
|
|
|
});
|
|
|
|
|
2022-09-14 11:26:01 +00:00
|
|
|
it('should exist', async () => {
|
2022-09-06 12:03:37 +00:00
|
|
|
await wrapper.setData({ visible: true });
|
|
|
|
|
|
|
|
expect(wrapper.find('.p-scrolltop.p-component').exists()).toBe(true);
|
|
|
|
});
|
2022-09-14 11:26:01 +00:00
|
|
|
});
|