diff --git a/app/assets/javascripts/pipelines/components/header_component.vue b/app/assets/javascripts/pipelines/components/header_component.vue index a36d5d9b58f4837131a0ef7048853ebe054b44ba..065e40bd3ea89785dab3b9b165b70c2801aca590 100644 --- a/app/assets/javascripts/pipelines/components/header_component.vue +++ b/app/assets/javascripts/pipelines/components/header_component.vue @@ -16,6 +16,7 @@ import { DELETE_FAILURE, DEFAULT, BUTTON_TOOLTIP_RETRY, + BUTTON_TOOLTIP_CANCEL, } from '../constants'; import cancelPipelineMutation from '../graphql/mutations/cancel_pipeline.mutation.graphql'; import deletePipelineMutation from '../graphql/mutations/delete_pipeline.mutation.graphql'; @@ -29,6 +30,7 @@ const POLL_INTERVAL = 10000; export default { name: 'PipelineHeaderSection', BUTTON_TOOLTIP_RETRY, + BUTTON_TOOLTIP_CANCEL, pipelineCancel: 'pipelineCancel', pipelineRetry: 'pipelineRetry', finishedStatuses: ['FAILED', 'SUCCESS', 'CANCELED'], @@ -275,6 +277,9 @@ export default { - {{ __('Cancel running') }} + {{ __('Cancel pipeline') }} { }); }); + 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({