diff options
Diffstat (limited to 'spec/frontend/pipelines/graph/graph_component_spec.js')
-rw-r--r-- | spec/frontend/pipelines/graph/graph_component_spec.js | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/spec/frontend/pipelines/graph/graph_component_spec.js b/spec/frontend/pipelines/graph/graph_component_spec.js index cfc3b7af282..3e8d4ba314c 100644 --- a/spec/frontend/pipelines/graph/graph_component_spec.js +++ b/spec/frontend/pipelines/graph/graph_component_spec.js @@ -1,10 +1,10 @@ import { mount, shallowMount } from '@vue/test-utils'; +import { GRAPHQL } from '~/pipelines/components/graph/constants'; import PipelineGraph from '~/pipelines/components/graph/graph_component.vue'; -import StageColumnComponent from '~/pipelines/components/graph/stage_column_component.vue'; import JobItem from '~/pipelines/components/graph/job_item.vue'; import LinkedPipelinesColumn from '~/pipelines/components/graph/linked_pipelines_column.vue'; +import StageColumnComponent from '~/pipelines/components/graph/stage_column_component.vue'; import LinksLayer from '~/pipelines/components/graph_shared/links_layer.vue'; -import { GRAPHQL } from '~/pipelines/components/graph/constants'; import { generateResponse, mockPipelineResponse, @@ -22,6 +22,13 @@ describe('graph component', () => { pipeline: generateResponse(mockPipelineResponse, 'root/fungi-xoxo'), }; + const defaultData = { + measurements: { + width: 800, + height: 800, + }, + }; + const createComponent = ({ data = {}, mountFn = shallowMount, @@ -34,7 +41,10 @@ describe('graph component', () => { ...props, }, data() { - return { ...data }; + return { + ...defaultData, + ...data, + }; }, provide: { dataMethod: GRAPHQL, |