Commit f5c27935 authored by Denys Mishunov's avatar Denys Mishunov

Added form footer actions component

parent bfe74afe
<template functional>
<footer class="form-actions d-flex justify-content-between">
<div><slot name="prepend"></slot></div>
<div><slot></slot></div>
<div><slot name="append"></slot></div>
</footer>
</template>
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.text().replace(/\s+/g, '')).toBe(`${prepend}${defaultSlot}${append}`);
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment