diff options
Diffstat (limited to 'spec/frontend/pipelines/test_reports/test_case_details_spec.js')
-rw-r--r-- | spec/frontend/pipelines/test_reports/test_case_details_spec.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/frontend/pipelines/test_reports/test_case_details_spec.js b/spec/frontend/pipelines/test_reports/test_case_details_spec.js index 29c07e5e9f8..f194864447c 100644 --- a/spec/frontend/pipelines/test_reports/test_case_details_spec.js +++ b/spec/frontend/pipelines/test_reports/test_case_details_spec.js @@ -3,6 +3,7 @@ import { shallowMount } from '@vue/test-utils'; import { extendedWrapper } from 'helpers/vue_test_utils_helper'; import TestCaseDetails from '~/pipelines/components/test_reports/test_case_details.vue'; import CodeBlock from '~/vue_shared/components/code_block.vue'; +import ModalCopyButton from '~/vue_shared/components/modal_copy_button.vue'; describe('Test case details', () => { let wrapper; @@ -19,6 +20,7 @@ describe('Test case details', () => { system_output: 'Line 42 is broken', }; + const findCopyFileBtn = () => wrapper.findComponent(ModalCopyButton); const findModal = () => wrapper.findComponent(GlModal); const findName = () => wrapper.findByTestId('test-case-name'); const findFile = () => wrapper.findByTestId('test-case-file'); @@ -66,6 +68,10 @@ describe('Test case details', () => { expect(findFileLink().attributes('href')).toBe(defaultTestCase.filePath); }); + it('renders copy button for test case file', () => { + expect(findCopyFileBtn().attributes('text')).toBe(defaultTestCase.file); + }); + it('renders the test case duration', () => { expect(findDuration().text()).toBe(defaultTestCase.formattedTime); }); |