Fix tests after changing node data structure

This commit is contained in:
mabashian
2020-08-19 12:53:41 -04:00
parent c318a17590
commit 5b56bda0bb
3 changed files with 43 additions and 27 deletions

View File

@@ -9,12 +9,16 @@ describe('WorkflowNodeHelp', () => {
}); });
test('renders the expected content for a completed job template job', () => { test('renders the expected content for a completed job template job', () => {
const node = { const node = {
originalNodeObject: {
summary_fields: {
job: { job: {
name: 'Foo Job Template', name: 'Foo Job Template',
elapsed: 9000, elapsed: 9000,
status: 'successful', status: 'successful',
type: 'job', type: 'job',
}, },
},
},
unifiedJobTemplate: { unifiedJobTemplate: {
name: 'Foo Job Template', name: 'Foo Job Template',
unified_job_type: 'job', unified_job_type: 'job',

View File

@@ -64,6 +64,8 @@ const workflowContext = {
}, },
{ {
id: 2, id: 2,
originalNodeObject: {
summary_fields: {
job: { job: {
name: 'Foo JT', name: 'Foo JT',
type: 'job', type: 'job',
@@ -71,6 +73,8 @@ const workflowContext = {
elapsed: 60, elapsed: 60,
}, },
}, },
},
},
{ {
id: 3, id: 3,
}, },

View File

@@ -5,6 +5,8 @@ import WorkflowOutputNode from './WorkflowOutputNode';
const nodeWithJT = { const nodeWithJT = {
id: 2, id: 2,
originalNodeObject: {
summary_fields: {
job: { job: {
elapsed: 7, elapsed: 7,
id: 9000, id: 9000,
@@ -12,15 +14,19 @@ const nodeWithJT = {
status: 'successful', status: 'successful',
type: 'job', type: 'job',
}, },
},
unifiedJobTemplate: { unifiedJobTemplate: {
id: 77, id: 77,
name: 'Automation JT', name: 'Automation JT',
unified_job_type: 'job', unified_job_type: 'job',
}, },
},
}; };
const nodeWithoutJT = { const nodeWithoutJT = {
id: 2, id: 2,
originalNodeObject: {
summary_fields: {
job: { job: {
elapsed: 7, elapsed: 7,
id: 9000, id: 9000,
@@ -28,6 +34,8 @@ const nodeWithoutJT = {
status: 'successful', status: 'successful',
type: 'job', type: 'job',
}, },
},
},
}; };
const nodePositions = { const nodePositions = {