diff options
Diffstat (limited to 'spec/frontend/pipelines/graph')
-rw-r--r-- | spec/frontend/pipelines/graph/graph_component_wrapper_spec.js | 2 | ||||
-rw-r--r-- | spec/frontend/pipelines/graph/linked_pipeline_spec.js | 6 |
2 files changed, 7 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 4914a9a1ced..bb7e27b5ec2 100644 --- a/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js +++ b/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js @@ -5,6 +5,7 @@ import VueApollo from 'vue-apollo'; import { useLocalStorageSpy } from 'helpers/local_storage_helper'; import createMockApollo from 'helpers/mock_apollo_helper'; import getPipelineDetails from 'shared_queries/pipelines/get_pipeline_details.query.graphql'; +import getUserCallouts from '~/graphql_shared/queries/get_user_callouts.query.graphql'; import { IID_FAILURE, LAYER_VIEW, @@ -17,7 +18,6 @@ import GraphViewSelector from '~/pipelines/components/graph/graph_view_selector. import StageColumnComponent from '~/pipelines/components/graph/stage_column_component.vue'; import LinksLayer from '~/pipelines/components/graph_shared/links_layer.vue'; import * as parsingUtils from '~/pipelines/components/parsing_utils'; -import getUserCallouts from '~/pipelines/graphql/queries/get_user_callouts.query.graphql'; import { mapCallouts, mockCalloutsResponse, mockPipelineResponse } from './mock_data'; const defaultProvide = { diff --git a/spec/frontend/pipelines/graph/linked_pipeline_spec.js b/spec/frontend/pipelines/graph/linked_pipeline_spec.js index 96f2cd1e371..c7d95526a0c 100644 --- a/spec/frontend/pipelines/graph/linked_pipeline_spec.js +++ b/spec/frontend/pipelines/graph/linked_pipeline_spec.js @@ -14,6 +14,7 @@ describe('Linked pipeline', () => { let wrapper; const findButton = () => wrapper.find(GlButton); + const findDownstreamPipelineTitle = () => wrapper.find('[data-testid="downstream-title"]'); const findPipelineLabel = () => wrapper.find('[data-testid="downstream-pipeline-label"]'); const findLinkedPipeline = () => wrapper.find({ ref: 'linkedPipeline' }); const findLoadingIcon = () => wrapper.find(GlLoadingIcon); @@ -119,6 +120,11 @@ describe('Linked pipeline', () => { expect(findPipelineLabel().exists()).toBe(true); }); + it('should have the name of the trigger job on the card when it is a child pipeline', () => { + createWrapper(downstreamProps); + expect(findDownstreamPipelineTitle().text()).toBe(mockPipeline.source_job.name); + }); + it('should display parent label when pipeline project id is the same as triggered_by pipeline project id', () => { createWrapper(upstreamProps); expect(findPipelineLabel().exists()).toBe(true); |