diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-21 02:50:22 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-21 02:50:22 +0300 |
commit | 9dc93a4519d9d5d7be48ff274127136236a3adb3 (patch) | |
tree | 70467ae3692a0e35e5ea56bcb803eb512a10bedb /spec/frontend/environments | |
parent | 4b0f34b6d759d6299322b3a54453e930c6121ff0 (diff) |
Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc43
Diffstat (limited to 'spec/frontend/environments')
-rw-r--r-- | spec/frontend/environments/enable_review_app_modal_spec.js | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/spec/frontend/environments/enable_review_app_modal_spec.js b/spec/frontend/environments/enable_review_app_modal_spec.js index f5063cff620..9a3f13f19d5 100644 --- a/spec/frontend/environments/enable_review_app_modal_spec.js +++ b/spec/frontend/environments/enable_review_app_modal_spec.js @@ -1,4 +1,5 @@ import { shallowMount } from '@vue/test-utils'; +import { extendedWrapper } from 'helpers/vue_test_utils_helper'; import EnableReviewAppButton from '~/environments/components/enable_review_app_modal.vue'; import ModalCopyButton from '~/vue_shared/components/modal_copy_button.vue'; @@ -11,15 +12,25 @@ describe('Enable Review App Button', () => { describe('renders the modal', () => { beforeEach(() => { - wrapper = shallowMount(EnableReviewAppButton, { - propsData: { - modalId: 'fake-id', - }, - }); + wrapper = extendedWrapper( + shallowMount(EnableReviewAppButton, { + propsData: { + modalId: 'fake-id', + }, + provide: { + defaultBranchName: 'main', + }, + }), + ); + }); + + it('renders the defaultBranchName copy', () => { + const findCopyString = () => wrapper.findByTestId('enable-review-app-copy-string'); + expect(findCopyString().text()).toContain('- main'); }); it('renders the copyToClipboard button', () => { - expect(wrapper.find(ModalCopyButton).exists()).toBe(true); + expect(wrapper.findComponent(ModalCopyButton).exists()).toBe(true); }); }); }); |