test(draw/BpmnRenderer): add event tests
This commit is contained in:
parent
7d0e8dabe0
commit
0a061e2060
|
@ -0,0 +1,43 @@
|
|||
var fs = require('fs');
|
||||
|
||||
var Viewer = require('../../../../lib/Viewer');
|
||||
|
||||
var Matchers = require('../../Matchers');
|
||||
|
||||
|
||||
describe('draw/BpmnRenderer', function() {
|
||||
|
||||
beforeEach(Matchers.add);
|
||||
|
||||
var container;
|
||||
|
||||
beforeEach(function() {
|
||||
container = document.createElement('div');
|
||||
document.getElementsByTagName('body')[0].appendChild(container);
|
||||
});
|
||||
|
||||
|
||||
it('should render events', function(done) {
|
||||
|
||||
var xml = fs.readFileSync('test/fixtures/bpmn/render/events.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');
|
||||
|
||||
var renderer = new Viewer(container);
|
||||
|
||||
renderer.importXML(xml, function(err) {
|
||||
done(err);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
Loading…
Reference in New Issue