diff options
Diffstat (limited to 'spec/frontend/pipelines/header_component_spec.js')
-rw-r--r-- | spec/frontend/pipelines/header_component_spec.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/spec/frontend/pipelines/header_component_spec.js b/spec/frontend/pipelines/header_component_spec.js index e583c0798f5..18def4ab62c 100644 --- a/spec/frontend/pipelines/header_component_spec.js +++ b/spec/frontend/pipelines/header_component_spec.js @@ -6,7 +6,7 @@ import HeaderComponent from '~/pipelines/components/header_component.vue'; import cancelPipelineMutation from '~/pipelines/graphql/mutations/cancel_pipeline.mutation.graphql'; import deletePipelineMutation from '~/pipelines/graphql/mutations/delete_pipeline.mutation.graphql'; import retryPipelineMutation from '~/pipelines/graphql/mutations/retry_pipeline.mutation.graphql'; -import { BUTTON_TOOLTIP_RETRY } from '~/pipelines/constants'; +import { BUTTON_TOOLTIP_RETRY, BUTTON_TOOLTIP_CANCEL } from '~/pipelines/constants'; import { mockCancelledPipelineHeader, mockFailedPipelineHeader, @@ -71,11 +71,6 @@ describe('Pipeline details header', () => { }); }; - afterEach(() => { - wrapper.destroy(); - wrapper = null; - }); - describe('initial loading', () => { beforeEach(() => { wrapper = createComponent(null, { isLoading: true }); @@ -174,6 +169,10 @@ describe('Pipeline details header', () => { }); }); + it('should render cancel action tooltip', () => { + expect(findCancelButton().attributes('title')).toBe(BUTTON_TOOLTIP_CANCEL); + }); + it('should display error message on failure', async () => { const failureMessage = 'failure message'; jest.spyOn(wrapper.vm.$apollo, 'mutate').mockResolvedValue({ |