Welcome to mirror list, hosted at ThFree Co, Russian Federation.

form_footer_actions_spec.js « form « components « vue_shared « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 361b162b6a036c2170013172035060e769bb57f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { shallowMount } from '@vue/test-utils';
import FormFooterActions from '~/vue_shared/components/form/form_footer_actions.vue';

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();
  });
});