49 lines
1.2 KiB
JavaScript
49 lines
1.2 KiB
JavaScript
import { shallowMount } from '@vue/test-utils';
|
|
import textLink from '@/ux-components/text-link/text-link.vue';
|
|
|
|
describe('text-link.vue', () => {
|
|
it('Should return class navigation-link', async () => {
|
|
// Act
|
|
const wrapper = shallowMount(textLink, {
|
|
propsData: {
|
|
linkType: 'navigation'
|
|
}
|
|
});
|
|
|
|
// Assert
|
|
const paragraph = wrapper.find('a');
|
|
|
|
// Expect
|
|
expect(paragraph.attributes('class')).toContain('navigation-link');
|
|
});
|
|
|
|
it('Should return class footer', async () => {
|
|
// Act
|
|
const wrapper = shallowMount(textLink, {
|
|
propsData: {
|
|
linkType: 'footer'
|
|
}
|
|
});
|
|
|
|
// Assert
|
|
const paragraph = wrapper.find('a');
|
|
|
|
// Expect
|
|
expect(paragraph.attributes('class')).toContain('footer');
|
|
});
|
|
|
|
it('Should return class text-small', async () => {
|
|
// Act
|
|
const wrapper = shallowMount(textLink, {
|
|
propsData: {
|
|
linkType: 'textSmall'
|
|
}
|
|
});
|
|
|
|
// Assert
|
|
const paragraph = wrapper.find('a');
|
|
|
|
// Expect
|
|
expect(paragraph.attributes('class')).toContain('small');
|
|
});
|
|
});
|