Commit 466d3efd authored by Sarah GP's avatar Sarah GP

Update specs for etag path

parent 93615feb
......@@ -19,7 +19,9 @@ export default {
type: Object,
required: true,
validator(value) {
return Object.keys(value).includes('graphqlResourceEtag');
return (
Object.keys(value).includes('graphqlResourceEtag') && value.graphqlResourceEtag.length > 0
);
},
},
pipeline: {
......
......@@ -9,6 +9,8 @@ import PipelineGraphWrapper from '~/pipelines/components/graph/graph_component_w
import { mockPipelineResponse } from './mock_data';
const defaultProvide = {
graphqlResourceEtag: 'frog/amphibirama/etag/',
metricsPath: '',
pipelineProjectPath: 'frog/amphibirama',
pipelineIid: '22',
};
......@@ -87,6 +89,13 @@ describe('Pipeline graph wrapper', () => {
it('displays the graph', () => {
expect(getGraph().exists()).toBe(true);
});
it('passes the etag resource and metrics path to the graph', () => {
expect(getGraph().props('configPaths')).toMatchObject({
graphqlResourceEtag: defaultProvide.graphqlResourceEtag,
metricsPath: defaultProvide.metricsPath,
});
});
});
describe('when there is an error', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment