2022-09-06 12:03:37 +00:00
|
|
|
import { mount } from '@vue/test-utils';
|
|
|
|
import Breadcrumb from './Breadcrumb.vue';
|
|
|
|
|
|
|
|
describe('Breadcrumb', () => {
|
|
|
|
it('should exist', () => {
|
|
|
|
const wrapper = mount(Breadcrumb, {
|
|
|
|
global: {
|
|
|
|
stubs: ['router-link']
|
|
|
|
},
|
|
|
|
props: {
|
2022-09-14 11:26:01 +00:00
|
|
|
home: { icon: 'pi pi-home', to: '/' },
|
|
|
|
model: [{ label: 'Computer' }, { label: 'Notebook' }, { label: 'Accessories' }, { label: 'Backpacks' }, { label: 'Item' }]
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
});
|
2022-09-14 11:26:01 +00:00
|
|
|
|
2022-09-06 12:03:37 +00:00
|
|
|
expect(wrapper.find('.p-breadcrumb.p-component').exists()).toBe(true);
|
|
|
|
expect(wrapper.findAll('.p-breadcrumb-chevron').length).toBe(5);
|
|
|
|
expect(wrapper.findAll('.p-menuitem-text').length).toBe(5);
|
|
|
|
});
|
2022-09-14 11:26:01 +00:00
|
|
|
});
|