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', () => {
const node = {
originalNodeObject: {
summary_fields: {
job: {
name: 'Foo Job Template',
elapsed: 9000,
status: 'successful',
type: 'job',
},
},
},
unifiedJobTemplate: {
name: 'Foo Job Template',
unified_job_type: 'job',

View File

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

View File

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