mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-01-11 17:44:12 +00:00
test(draw/BpmnRenderer): add test for group rendering
This commit is contained in:
parent
5e9afa4d3a
commit
a63186599e
24
test/fixtures/bpmn/render/group.bpmn
vendored
Normal file
24
test/fixtures/bpmn/render/group.bpmn
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:signavio="http://www.signavio.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" exporter="Signavio Process Editor, http://www.signavio.com" exporterVersion="7.0.0" expressionLanguage="http://www.w3.org/1999/XPath" id="sid-cfa9858b-87ba-4fce-9fef-52e81f98f01b" targetNamespace="http://www.signavio.com/bpmn20" typeLanguage="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL http://www.omg.org/spec/BPMN/2.0/20100501/BPMN20.xsd">
|
||||
<category id="sid-318c8299-67a6-4ce8-85d5-063e8d3ecb02">
|
||||
<categoryValue id="sid-318c8299-67a6-4ce8-85d5-063e8d3ecb0a" value="The Group "/>
|
||||
</category>
|
||||
|
||||
<process id="sid-d7765c68-4a90-436c-a48e-13fb5a554632" isClosed="false" isExecutable="false" processType="None">
|
||||
<task completionQuantity="1" id="sid-D1AF5313-B39D-4296-9046-4E6EB4BC0C09" isForCompensation="false" name="Test" startQuantity="1">
|
||||
<extensionElements>
|
||||
<signavio:signavioMetaData metaKey="bgcolor" metaValue="#ffffcc"/>
|
||||
</extensionElements>
|
||||
</task>
|
||||
<group categoryValueRef="sid-318c8299-67a6-4ce8-85d5-063e8d3ecb0a" id="sid-49EB3CED-C884-4360-82F6-A512CDE8A8BA"/>
|
||||
</process>
|
||||
<bpmndi:BPMNDiagram id="sid-07ebd7fb-c83e-428d-98b0-8c1a295d0104">
|
||||
<bpmndi:BPMNPlane bpmnElement="sid-d7765c68-4a90-436c-a48e-13fb5a554632" id="sid-6e859ea3-c93f-4c89-9709-67d30808c49f">
|
||||
<bpmndi:BPMNShape bpmnElement="sid-D1AF5313-B39D-4296-9046-4E6EB4BC0C09" id="sid-D1AF5313-B39D-4296-9046-4E6EB4BC0C09_gui">
|
||||
<omgdc:Bounds height="80.0" width="100.0" x="540.0" y="300.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape bpmnElement="sid-49EB3CED-C884-4360-82F6-A512CDE8A8BA" id="sid-49EB3CED-C884-4360-82F6-A512CDE8A8BA_gui">
|
||||
<omgdc:Bounds height="262.0" width="494.0" x="343.0" y="209.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</definitions>
|
13
test/fixtures/bpmn/render/groups.bpmn
vendored
13
test/fixtures/bpmn/render/groups.bpmn
vendored
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="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" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="_s7w2sLjYEeO7GYB44nIlfA" targetNamespace="http://activiti.org/bpmn">
|
||||
<bpmn2:process id="Process_1" isExecutable="false">
|
||||
<bpmn2:group id="Group_1"/>
|
||||
</bpmn2:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
|
||||
<bpmndi:BPMNShape id="_BPMNShape_Group_2" bpmnElement="Group_1">
|
||||
<dc:Bounds height="156.0" width="400.0" x="123.0" y="61.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn2:definitions>
|
@ -29,6 +29,17 @@ describe('draw/BpmnRenderer', function() {
|
||||
});
|
||||
|
||||
|
||||
it('should render group', function(done) {
|
||||
|
||||
var xml = fs.readFileSync('test/fixtures/bpmn/render/group.bpmn', 'utf8');
|
||||
|
||||
var renderer = new Viewer(container);
|
||||
|
||||
renderer.importXML(xml, function(err) {
|
||||
done(err);
|
||||
});
|
||||
});
|
||||
|
||||
it('should render events (interrupting)', function(done) {
|
||||
|
||||
var xml = fs.readFileSync('test/fixtures/bpmn/render/events-interrupting.bpmn', 'utf8');
|
||||
|
Loading…
x
Reference in New Issue
Block a user