Commit b6043f99 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '207463-form-footer-actions-component' into 'master'

Added Form Footer Actions component

See merge request gitlab-org/gitlab!29450
parents a0bea201 997bc7f6
<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>
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Form Footer Actions renders content properly 1`] = `
<footer
class="form-actions d-flex justify-content-between"
>
<div>
Bar
</div>
<div>
Foo
</div>
<div>
Abrakadabra
</div>
</footer>
`;
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();
});
});
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