diff options
Diffstat (limited to 'spec/frontend/pipelines/graph/graph_component_wrapper_spec.js')
-rw-r--r-- | spec/frontend/pipelines/graph/graph_component_wrapper_spec.js | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js b/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js index 587a3c67168..99bccd21656 100644 --- a/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js +++ b/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js @@ -10,6 +10,7 @@ import waitForPromises from 'helpers/wait_for_promises'; import getPipelineDetails from 'shared_queries/pipelines/get_pipeline_details.query.graphql'; import getUserCallouts from '~/graphql_shared/queries/get_user_callouts.query.graphql'; import axios from '~/lib/utils/axios_utils'; +import { HTTP_STATUS_OK } from '~/lib/utils/http_status'; import { PIPELINES_DETAIL_LINK_DURATION, PIPELINES_DETAIL_LINKS_TOTAL, @@ -199,6 +200,22 @@ describe('Pipeline graph wrapper', () => { }); }); + describe('events', () => { + beforeEach(async () => { + createComponentWithApollo(); + await waitForPromises(); + }); + describe('when receiving `setSkipRetryModal` event', () => { + it('passes down `skipRetryModal` value as true', async () => { + expect(getGraph().props('skipRetryModal')).toBe(false); + + await getGraph().vm.$emit('setSkipRetryModal'); + + expect(getGraph().props('skipRetryModal')).toBe(true); + }); + }); + }); + describe('when there is an error with an action in the graph', () => { beforeEach(async () => { createComponentWithApollo(); @@ -530,7 +547,7 @@ describe('Pipeline graph wrapper', () => { describe('with duration and no error', () => { beforeEach(async () => { mock = new MockAdapter(axios); - mock.onPost(metricsPath).reply(200, {}); + mock.onPost(metricsPath).reply(HTTP_STATUS_OK, {}); jest.spyOn(window.performance, 'getEntriesByName').mockImplementation(() => { return [{ duration }]; |