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

copy_email_to_clipboard_spec.js « copy « components « sidebar « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5b6db43a366fba00012b4004f0b3e7e01479527a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { shallowMount } from '@vue/test-utils';
import CopyEmailToClipboard from '~/sidebar/components/copy/copy_email_to_clipboard.vue';
import CopyableField from '~/sidebar/components/copy/copyable_field.vue';

describe('CopyEmailToClipboard component', () => {
  const mockIssueEmailAddress = 'sample+email@test.com';

  const wrapper = shallowMount(CopyEmailToClipboard, {
    propsData: {
      issueEmailAddress: mockIssueEmailAddress,
    },
  });

  it('sets CopyableField `value` prop to issueEmailAddress', () => {
    expect(wrapper.findComponent(CopyableField).props('value')).toBe(mockIssueEmailAddress);
  });
});