From 90693cc231ba6e1645dc57f2a9111a7b5a5ceae0 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 2 May 2023 21:19:21 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/frontend/commit/commit_box_pipeline_mini_graph_spec.js | 8 ++++---- .../frontend/commit/components/commit_box_pipeline_status_spec.js | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'spec/frontend/commit') diff --git a/spec/frontend/commit/commit_box_pipeline_mini_graph_spec.js b/spec/frontend/commit/commit_box_pipeline_mini_graph_spec.js index cc251104811..7be68df61de 100644 --- a/spec/frontend/commit/commit_box_pipeline_mini_graph_spec.js +++ b/spec/frontend/commit/commit_box_pipeline_mini_graph_spec.js @@ -11,7 +11,7 @@ import PipelineMiniGraph from '~/pipelines/components/pipeline_mini_graph/pipeli import { COMMIT_BOX_POLL_INTERVAL } from '~/projects/commit_box/info/constants'; import getLinkedPipelinesQuery from '~/projects/commit_box/info/graphql/queries/get_linked_pipelines.query.graphql'; import getPipelineStagesQuery from '~/projects/commit_box/info/graphql/queries/get_pipeline_stages.query.graphql'; -import * as graphQlUtils from '~/pipelines/components/graph/utils'; +import * as sharedGraphQlUtils from '~/graphql_shared/utils'; import { mockDownstreamQueryResponse, mockPipelineStagesQueryResponse, @@ -241,16 +241,16 @@ describe('Commit box pipeline mini graph', () => { }); it('toggles query polling with visibility check', async () => { - jest.spyOn(graphQlUtils, 'toggleQueryPollingByVisibility'); + jest.spyOn(sharedGraphQlUtils, 'toggleQueryPollingByVisibility'); createComponent(); await waitForPromises(); - expect(graphQlUtils.toggleQueryPollingByVisibility).toHaveBeenCalledWith( + expect(sharedGraphQlUtils.toggleQueryPollingByVisibility).toHaveBeenCalledWith( wrapper.vm.$apollo.queries.pipelineStages, ); - expect(graphQlUtils.toggleQueryPollingByVisibility).toHaveBeenCalledWith( + expect(sharedGraphQlUtils.toggleQueryPollingByVisibility).toHaveBeenCalledWith( wrapper.vm.$apollo.queries.pipeline, ); }); diff --git a/spec/frontend/commit/components/commit_box_pipeline_status_spec.js b/spec/frontend/commit/components/commit_box_pipeline_status_spec.js index 5df35cc6dda..80b75a0a65e 100644 --- a/spec/frontend/commit/components/commit_box_pipeline_status_spec.js +++ b/spec/frontend/commit/components/commit_box_pipeline_status_spec.js @@ -12,7 +12,7 @@ import { PIPELINE_STATUS_FETCH_ERROR, } from '~/projects/commit_box/info/constants'; import getLatestPipelineStatusQuery from '~/projects/commit_box/info/graphql/queries/get_latest_pipeline_status.query.graphql'; -import * as graphQlUtils from '~/pipelines/components/graph/utils'; +import * as sharedGraphQlUtils from '~/graphql_shared/utils'; import { mockPipelineStatusResponse } from '../mock_data'; const mockProvide = { @@ -132,13 +132,13 @@ describe('Commit box pipeline status', () => { }); it('toggles pipelineStatus polling with visibility check', async () => { - jest.spyOn(graphQlUtils, 'toggleQueryPollingByVisibility'); + jest.spyOn(sharedGraphQlUtils, 'toggleQueryPollingByVisibility'); createComponent(); await waitForPromises(); - expect(graphQlUtils.toggleQueryPollingByVisibility).toHaveBeenCalledWith( + expect(sharedGraphQlUtils.toggleQueryPollingByVisibility).toHaveBeenCalledWith( wrapper.vm.$apollo.queries.pipelineStatus, ); }); -- cgit v1.2.3