Skip to content

Commit daaaba9

Browse files
committed
test: verify nested change with context
Related to #20
1 parent 4464c30 commit daaaba9

File tree

3 files changed

+72
-0
lines changed

3 files changed

+72
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:zeebe="http://camunda.org/schema/zeebe/1.0" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_1440wfy" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.25.0" modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.5.0">
3+
<bpmn:process id="PROCESS_1" isExecutable="true">
4+
<bpmn:serviceTask id="TASK_1">
5+
<bpmn:extensionElements>
6+
<zeebe:ioMapping>
7+
<zeebe:input source="=FOO" target="FOO_CHANGED" />
8+
</zeebe:ioMapping>
9+
<zeebe:taskHeaders>
10+
<zeebe:header key="FIRST" />
11+
<zeebe:header key="SECOND" />
12+
</zeebe:taskHeaders>
13+
</bpmn:extensionElements>
14+
</bpmn:serviceTask>
15+
</bpmn:process>
16+
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
17+
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="PROCESS_1">
18+
<bpmndi:BPMNShape id="TASK_1_di" bpmnElement="TASK_1">
19+
<dc:Bounds x="180" y="80" width="100" height="80" />
20+
</bpmndi:BPMNShape>
21+
</bpmndi:BPMNPlane>
22+
</bpmndi:BPMNDiagram>
23+
</bpmn:definitions>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:zeebe="http://camunda.org/schema/zeebe/1.0" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_1440wfy" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.25.0" modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.5.0">
3+
<bpmn:process id="PROCESS_1" isExecutable="true">
4+
<bpmn:serviceTask id="TASK_1">
5+
<bpmn:extensionElements>
6+
<zeebe:ioMapping>
7+
<zeebe:input source="=FOO" target="FOO" />
8+
</zeebe:ioMapping>
9+
<zeebe:taskHeaders>
10+
<zeebe:header key="FIRST" />
11+
</zeebe:taskHeaders>
12+
</bpmn:extensionElements>
13+
</bpmn:serviceTask>
14+
</bpmn:process>
15+
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
16+
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="PROCESS_1">
17+
<bpmndi:BPMNShape id="TASK_1_di" bpmnElement="TASK_1">
18+
<dc:Bounds x="180" y="80" width="100" height="80" />
19+
</bpmndi:BPMNShape>
20+
</bpmndi:BPMNPlane>
21+
</bpmndi:BPMNDiagram>
22+
</bpmn:definitions>

test/spec/differ.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,33 @@ describe('diffing', function() {
317317
});
318318

319319

320+
it('extension elements', function(done) {
321+
322+
var aDiagram = readFileSync('test/fixtures/extension-elements/c8-before.bpmn', 'utf-8');
323+
var bDiagram = readFileSync('test/fixtures/extension-elements/c8-after.bpmn', 'utf-8');
324+
325+
326+
// when
327+
testDiff(aDiagram, bDiagram, function(err, results, aDefinitions, bDefinitions) {
328+
329+
if (err) {
330+
return done(err);
331+
}
332+
333+
// TODO(nikku): ensure we provide enough meta-data to be able to
334+
// visualize the actual change
335+
336+
// then
337+
expect(results._added).to.be.empty;
338+
expect(results._removed).to.be.empty;
339+
expect(results._layoutChanged).to.be.empty;
340+
expect(results._changed).to.have.keys([ 'TASK_1' ]);
341+
342+
done();
343+
});
344+
});
345+
346+
320347
it('pizza collaboration StartEvent move', function(done) {
321348

322349
var aDiagram = readFileSync('test/fixtures/pizza-collaboration/start-event-old.bpmn', 'utf-8');

0 commit comments

Comments
 (0)