Commit a0c516cb authored by Bryce Johnson's avatar Bryce Johnson

Fix propsData in graph component spec.

parent 6b4b52b7
...@@ -5,8 +5,8 @@ import linkedPipelineJSON from './linked_pipelines_mock_data'; ...@@ -5,8 +5,8 @@ import linkedPipelineJSON from './linked_pipelines_mock_data';
const GraphComponent = Vue.extend(graphComponent); const GraphComponent = Vue.extend(graphComponent);
const state = { const defaultPropsData = {
graph: graphJSON.details.stages, pipeline: graphJSON.details.stages,
triggered: linkedPipelineJSON.triggered, triggered: linkedPipelineJSON.triggered,
triggerer: linkedPipelineJSON.triggerer, triggerer: linkedPipelineJSON.triggerer,
}; };
...@@ -15,7 +15,7 @@ describe('graph component', function () { ...@@ -15,7 +15,7 @@ describe('graph component', function () {
describe('while is loading', function () { describe('while is loading', function () {
beforeEach(function () { beforeEach(function () {
this.component = new GraphComponent({ this.component = new GraphComponent({
propsData: { state }, propsData: defaultPropsData,
}).$mount(); }).$mount();
}); });
...@@ -27,7 +27,7 @@ describe('graph component', function () { ...@@ -27,7 +27,7 @@ describe('graph component', function () {
describe('when linked pipelines are present', function () { describe('when linked pipelines are present', function () {
beforeEach(function () { beforeEach(function () {
this.component = new GraphComponent({ this.component = new GraphComponent({
propsData: { state }, propsData: defaultPropsData,
}).$mount(); }).$mount();
}); });
...@@ -108,7 +108,7 @@ describe('graph component', function () { ...@@ -108,7 +108,7 @@ describe('graph component', function () {
describe('when linked pipelines are not present', function () { describe('when linked pipelines are not present', function () {
beforeEach(function () { beforeEach(function () {
this.component = new GraphComponent({ this.component = new GraphComponent({
propsData: { state: Object.assign(state, { triggered: [], triggerer: [] }) }, propsData: { pipeline: graphJSON, triggered: [], triggerer: [] },
}).$mount(); }).$mount();
}); });
......
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