Skip to content

Commit

Permalink
test: verify i18n extension diagram roundtrips
Browse files Browse the repository at this point in the history
  • Loading branch information
nikku authored and fake-join[bot] committed Nov 24, 2021
1 parent f0653c6 commit d7c9683
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
47 changes: 47 additions & 0 deletions test/fixtures/bpmn/i18n.bpmn
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:i18n="http://www.omg.org/spec/BPMN/non-normative/extensions/i18n/1.0" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_1xsinej" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.8.0-rc.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0" xml:lang="en">
<bpmn:process id="Process_0dp8lmr" isExecutable="true">
<bpmn:startEvent id="StartEvent_1">
<bpmn:documentation>A start event.</bpmn:documentation>
<bpmn:extensionElements>
<i18n:translation xml:lang="de">Startereignis</i18n:translation>
<i18n:translation target="@isInterrupting" xml:lang="de">ja</i18n:translation>
<i18n:translation target="documentation" xml:lang="de">Ein Startereignis.</i18n:translation>
</bpmn:extensionElements>
<bpmn:outgoing>Flow_1lpbdia</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:task id="Activity_0eb4n4l">
<bpmn:incoming>Flow_1lpbdia</bpmn:incoming>
<bpmn:outgoing>Flow_0cg72xx</bpmn:outgoing>
</bpmn:task>
<bpmn:sequenceFlow id="Flow_1lpbdia" sourceRef="StartEvent_1" targetRef="Activity_0eb4n4l" />
<bpmn:endEvent id="Event_1kw5c3l" name="Ended">
<bpmn:incoming>Flow_0cg72xx</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0cg72xx" sourceRef="Activity_0eb4n4l" targetRef="Event_1kw5c3l" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_0dp8lmr">
<bpmndi:BPMNEdge id="Flow_1lpbdia_di" bpmnElement="Flow_1lpbdia">
<di:waypoint x="215" y="117" />
<di:waypoint x="270" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0cg72xx_di" bpmnElement="Flow_0cg72xx">
<di:waypoint x="370" y="117" />
<di:waypoint x="432" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="179" y="99" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0eb4n4l_di" bpmnElement="Activity_0eb4n4l">
<dc:Bounds x="270" y="77" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_1kw5c3l_di" bpmnElement="Event_1kw5c3l">
<dc:Bounds x="432" y="99" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="434" y="142" width="32" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
17 changes: 17 additions & 0 deletions test/spec/xml/roundtrip.js
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,23 @@ describe('bpmn-moddle - roundtrip', function() {
});


it('i18n', async function() {

// given
var {
rootElement
} = await fromFile('test/fixtures/bpmn/i18n.bpmn');

// when
var {
xml
} = await toXML(rootElement, { format: true });

// then
await validate(xml);
});


it('BPMN in color properties', async function() {

// given
Expand Down

0 comments on commit d7c9683

Please sign in to comment.