diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-14 15:09:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-14 15:09:26 +0300 |
commit | 2e4c4055181eec9186458dd5dd3219c937032ec7 (patch) | |
tree | eee59e7124ffcf093f1b53369436c69cfe4d9cc5 /spec/frontend/vue_shared | |
parent | 97f0ae7454597105a27df65ffb772949d9d4f3cb (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/vue_shared')
-rw-r--r-- | spec/frontend/vue_shared/components/form/__snapshots__/form_footer_actions_spec.js.snap | 19 | ||||
-rw-r--r-- | spec/frontend/vue_shared/components/form/form_footer_actions_spec.js | 29 |
2 files changed, 48 insertions, 0 deletions
diff --git a/spec/frontend/vue_shared/components/form/__snapshots__/form_footer_actions_spec.js.snap b/spec/frontend/vue_shared/components/form/__snapshots__/form_footer_actions_spec.js.snap new file mode 100644 index 00000000000..2189d6ac3cc --- /dev/null +++ b/spec/frontend/vue_shared/components/form/__snapshots__/form_footer_actions_spec.js.snap @@ -0,0 +1,19 @@ +// 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> +`; diff --git a/spec/frontend/vue_shared/components/form/form_footer_actions_spec.js b/spec/frontend/vue_shared/components/form/form_footer_actions_spec.js new file mode 100644 index 00000000000..30e16bd12da --- /dev/null +++ b/spec/frontend/vue_shared/components/form/form_footer_actions_spec.js @@ -0,0 +1,29 @@ +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(); + }); +}); |