30 lines
634 B
JavaScript
30 lines
634 B
JavaScript
import FormFooterActions from '~/vue_shared/components/form/form_footer_actions.vue';
|
|
import { shallowMount } from '@vue/test-utils';
|
|
|
|
describe('Form Footer Actions', () => {
|
|
let wrapper;
|
|
|
|
function createComponent(slots = {}) {
|
|
wrapper = shallowMount(FormFooterActions, {
|
|
slots,
|
|
});
|
|
}
|
|
|
|
afterEach(() => {
|
|
wrapper.destroy();
|
|
});
|
|
|
|
it('renders content properly', () => {
|
|
const defaultSlot = 'Foo';
|
|
const prepend = 'Bar';
|
|
const append = 'Abrakadabra';
|
|
createComponent({
|
|
default: defaultSlot,
|
|
prepend,
|
|
append,
|
|
});
|
|
|
|
expect(wrapper.element).toMatchSnapshot();
|
|
});
|
|
});
|