test(import): verify duplicate id behavior
This commit is contained in:
parent
1531b32e90
commit
6ae4c3d0c3
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<bpmn2:definitions
|
||||
xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"
|
||||
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
|
||||
id="definitions"
|
||||
targetNamespace="http://bpmn.io/schema/bpmn">
|
||||
|
||||
<bpmn2:process id="test" />
|
||||
<bpmn2:process id="test" />
|
||||
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="test">
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn2:definitions>
|
|
@ -230,6 +230,25 @@ describe('Viewer', function() {
|
|||
});
|
||||
});
|
||||
|
||||
|
||||
it('should handle duplicate ids', function(done) {
|
||||
|
||||
var xml = require('../fixtures/bpmn/error/duplicate-ids.bpmn');
|
||||
|
||||
// when
|
||||
createViewer(xml, function(err, warnings) {
|
||||
|
||||
// then
|
||||
expect(err).not.to.exist;
|
||||
|
||||
expectWarnings(warnings, [
|
||||
/duplicate ID <test>/
|
||||
]);
|
||||
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue