Skip to content

Commit 1ac7457

Browse files
Merge pull request finos#1472 from markscott-ms/fix-flows
fix instantiations of CalmNode and CalmRelationships - missing additionalProperties argument
2 parents 9f19724 + baada26 commit 1ac7457

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

shared/src/docify/graphing/c4.spec.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ describe('buildParentChildMappings', () => {
1616
'rel1',
1717
new CalmComposedOfType('parent1', ['child1', 'child2']),
1818
new CalmMetadata({}),
19-
[]
19+
[],
20+
{}
2021
);
2122
const { parentLookup, childrenLookup } = buildParentChildMappings([composedOfRel]);
2223
expect(parentLookup).toEqual({ child1: 'parent1', child2: 'parent1' });
@@ -28,7 +29,8 @@ describe('buildParentChildMappings', () => {
2829
'rel2',
2930
new CalmDeployedInType('env1', ['service1']),
3031
new CalmMetadata({}),
31-
[]
32+
[],
33+
{}
3234
);
3335
const { parentLookup, childrenLookup } = buildParentChildMappings([deployedInRel]);
3436
expect(parentLookup).toEqual({ service1: 'env1' });
@@ -48,20 +50,23 @@ describe('C4Model', () => {
4850
new CalmComposedOfType('system1', ['service1', 'service2']),
4951
new CalmMetadata({}),
5052
[],
53+
{},
5154
'system1 is composed of service1 & service2'
5255
);
5356
const interactsRel = new CalmRelationship(
5457
'rel2',
5558
new CalmInteractsType('actor1', ['service1']),
5659
new CalmMetadata({}),
5760
[],
61+
{},
5862
'actor1 interacts with service1'
5963
);
6064
const connectsRel = new CalmRelationship(
6165
'rel3',
62-
new CalmConnectsType({ node: 'service2', interfaces: [] }, { node: 'actor1', interfaces: [] }),
66+
new CalmConnectsType({ node: 'service2', interfaces: [] }, { node: 'actor1', interfaces: [] }),
6367
new CalmMetadata({}),
6468
[],
69+
{},
6570
'service2 connects to actor1'
6671
);
6772

@@ -110,7 +115,8 @@ describe('C4Model', () => {
110115
new CalmNodeDetails('', ''),
111116
[],
112117
[],
113-
new CalmMetadata({})
118+
new CalmMetadata({}),
119+
{}
114120
);
115121
}
116122
});

shared/src/docify/graphing/control-registry.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { CalmNode } from '../../model/node';
66
import { CalmRelationship, CalmConnectsType } from '../../model/relationship';
77
import { CalmNodeInterface } from '../../model/interface';
88
import { CalmFlow, CalmFlowTransition } from '../../model/flow';
9-
import {CalmControlsSchema} from '../../types/control-types';
9+
import { CalmControlsSchema } from '../../types/control-types';
1010

1111
describe('ControlRegistry', () => {
1212
let controlRegistry: ControlRegistry;
@@ -73,7 +73,8 @@ describe('ControlRegistry', () => {
7373
undefined,
7474
undefined,
7575
[nodeControl],
76-
new CalmMetadata({})
76+
new CalmMetadata({}),
77+
{}
7778
)
7879
];
7980

@@ -86,6 +87,7 @@ describe('ControlRegistry', () => {
8687
),
8788
new CalmMetadata({}),
8889
[relationshipControl],
90+
{},
8991
'Test relationship'
9092
)
9193
];

shared/src/docify/graphing/flow-sequence-helper.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ describe('FlowSequenceHelper', () => {
1515

1616
// Create test nodes
1717
const nodes = [
18-
new CalmNode('document-system', 'system', 'DocuFlow', 'Main document management system', undefined, undefined, undefined, new CalmMetadata({})),
19-
new CalmNode('svc-upload', 'service', 'Upload Service', 'Handles user document uploads', undefined, undefined, undefined, new CalmMetadata({})),
20-
new CalmNode('svc-storage', 'service', 'Storage Service', 'Stores and retrieves documents securely', undefined, undefined, undefined, new CalmMetadata({})),
21-
new CalmNode('db-docs', 'database', 'Document Database', 'Stores metadata and document references', undefined, undefined, undefined, new CalmMetadata({}))
18+
new CalmNode('document-system', 'system', 'DocuFlow', 'Main document management system', undefined, undefined, undefined, new CalmMetadata({}), {}),
19+
new CalmNode('svc-upload', 'service', 'Upload Service', 'Handles user document uploads', undefined, undefined, undefined, new CalmMetadata({}), {}),
20+
new CalmNode('svc-storage', 'service', 'Storage Service', 'Stores and retrieves documents securely', undefined, undefined, undefined, new CalmMetadata({}), {}),
21+
new CalmNode('db-docs', 'database', 'Document Database', 'Stores metadata and document references', undefined, undefined, undefined, new CalmMetadata({}), {})
2222
];
2323

2424
// Create test relationships

0 commit comments

Comments
 (0)