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,11 +9,15 @@ 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 = {
job: { originalNodeObject: {
name: 'Foo Job Template', summary_fields: {
elapsed: 9000, job: {
status: 'successful', name: 'Foo Job Template',
type: 'job', elapsed: 9000,
status: 'successful',
type: 'job',
},
},
}, },
unifiedJobTemplate: { unifiedJobTemplate: {
name: 'Foo Job Template', name: 'Foo Job Template',

View File

@@ -64,11 +64,15 @@ const workflowContext = {
}, },
{ {
id: 2, id: 2,
job: { originalNodeObject: {
name: 'Foo JT', summary_fields: {
type: 'job', job: {
status: 'successful', name: 'Foo JT',
elapsed: 60, type: 'job',
status: 'successful',
elapsed: 60,
},
},
}, },
}, },
{ {

View File

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