2014-05-27 15:48:04 +00:00
|
|
|
'use strict';
|
|
|
|
|
2014-06-18 09:45:30 +00:00
|
|
|
var Matchers = require('../../Matchers'),
|
|
|
|
TestHelper = require('../../TestHelper');
|
2014-04-25 11:31:18 +00:00
|
|
|
|
2014-06-18 09:45:30 +00:00
|
|
|
/* global bootstrapBpmnJS, inject */
|
2014-04-25 11:31:18 +00:00
|
|
|
|
|
|
|
|
2014-06-18 09:45:30 +00:00
|
|
|
var fs = require('fs');
|
2014-04-25 11:31:18 +00:00
|
|
|
|
|
|
|
|
2014-06-18 09:45:30 +00:00
|
|
|
describe('draw - bpmn renderer', function() {
|
2014-04-25 11:31:18 +00:00
|
|
|
|
2014-06-18 09:45:30 +00:00
|
|
|
beforeEach(Matchers.add);
|
2014-04-25 11:31:18 +00:00
|
|
|
|
2014-05-21 11:51:59 +00:00
|
|
|
|
2014-05-27 15:48:04 +00:00
|
|
|
it('should render activity markers', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync(__dirname + '/../../../fixtures/bpmn/draw/activity-markers.bpmn', 'utf8');
|
2014-06-18 09:45:30 +00:00
|
|
|
bootstrapBpmnJS(xml)(done);
|
2014-05-21 11:51:59 +00:00
|
|
|
});
|
2014-05-09 13:20:29 +00:00
|
|
|
|
2014-05-18 10:20:11 +00:00
|
|
|
|
2014-05-27 15:48:04 +00:00
|
|
|
it('should render activity markers (combination)', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync(__dirname + '/../../../fixtures/bpmn/draw/activity-markers-combination.bpmn', 'utf8');
|
2014-06-18 09:45:30 +00:00
|
|
|
bootstrapBpmnJS(xml)(done);
|
2014-05-19 14:22:55 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
2014-05-27 15:48:04 +00:00
|
|
|
it('should render conditional flows', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync(__dirname + '/../../../fixtures/bpmn/draw/conditional-flow.bpmn', 'utf8');
|
2014-06-18 09:45:30 +00:00
|
|
|
bootstrapBpmnJS(xml)(done);
|
2014-05-18 10:20:11 +00:00
|
|
|
});
|
|
|
|
|
2014-05-16 12:45:48 +00:00
|
|
|
|
2014-05-27 15:48:04 +00:00
|
|
|
it('should render conditional default flows', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync(__dirname + '/../../../fixtures/bpmn/draw/conditional-flow-default.bpmn', 'utf8');
|
2014-06-18 09:45:30 +00:00
|
|
|
bootstrapBpmnJS(xml)(done);
|
2014-05-16 12:45:48 +00:00
|
|
|
});
|
|
|
|
|
2014-05-02 09:17:25 +00:00
|
|
|
|
2014-05-27 15:48:04 +00:00
|
|
|
it('should render NO conditional flow (gateway)', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync(__dirname + '/../../../fixtures/bpmn/draw/conditional-flow-gateways.bpmn', 'utf8');
|
2014-06-18 09:45:30 +00:00
|
|
|
bootstrapBpmnJS(xml)(done);
|
2014-05-02 09:17:25 +00:00
|
|
|
});
|
|
|
|
|
2014-05-12 09:48:24 +00:00
|
|
|
|
2014-05-27 15:48:04 +00:00
|
|
|
it('should render conditional flow (typed task)', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync(__dirname + '/../../../fixtures/bpmn/draw/conditional-flow-typed-task.bpmn', 'utf8');
|
2014-06-18 09:45:30 +00:00
|
|
|
bootstrapBpmnJS(xml)(done);
|
2014-05-12 09:48:24 +00:00
|
|
|
});
|
|
|
|
|
2014-05-05 15:22:43 +00:00
|
|
|
|
2014-05-27 15:48:04 +00:00
|
|
|
it('should render data objects', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync(__dirname + '/../../../fixtures/bpmn/draw/data-objects.bpmn', 'utf8');
|
2014-06-18 09:45:30 +00:00
|
|
|
bootstrapBpmnJS(xml)(done);
|
2014-05-05 15:22:43 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
2014-05-27 15:48:04 +00:00
|
|
|
it('should render events', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync(__dirname + '/../../../fixtures/bpmn/draw/events.bpmn', 'utf8');
|
2014-06-18 09:45:30 +00:00
|
|
|
bootstrapBpmnJS(xml)(done);
|
2014-05-05 15:22:43 +00:00
|
|
|
});
|
2014-05-09 13:20:29 +00:00
|
|
|
|
2014-05-02 06:25:08 +00:00
|
|
|
|
2014-05-27 15:48:04 +00:00
|
|
|
it('should render events (interrupting)', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync(__dirname + '/../../../fixtures/bpmn/draw/events-interrupting.bpmn', 'utf8');
|
2014-06-18 09:45:30 +00:00
|
|
|
bootstrapBpmnJS(xml)(done);
|
2014-05-02 06:25:08 +00:00
|
|
|
});
|
2014-04-25 11:31:18 +00:00
|
|
|
|
2014-05-09 13:20:29 +00:00
|
|
|
|
2014-05-27 15:48:04 +00:00
|
|
|
it('should render event subprocesses (collapsed)', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync(__dirname + '/../../../fixtures/bpmn/draw/event-subprocesses-collapsed.bpmn', 'utf8');
|
2014-06-18 09:45:30 +00:00
|
|
|
bootstrapBpmnJS(xml)(done);
|
2014-04-25 11:31:18 +00:00
|
|
|
});
|
|
|
|
|
2014-05-09 13:20:29 +00:00
|
|
|
|
2014-05-27 15:48:04 +00:00
|
|
|
it('should render event subprocesses (expanded)', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync(__dirname + '/../../../fixtures/bpmn/draw/event-subprocesses-expanded.bpmn', 'utf8');
|
2014-06-18 09:45:30 +00:00
|
|
|
bootstrapBpmnJS(xml)(done);
|
2014-05-02 06:25:08 +00:00
|
|
|
});
|
|
|
|
|
2014-05-09 13:20:29 +00:00
|
|
|
|
2014-05-02 06:25:08 +00:00
|
|
|
it('should render gateways', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync(__dirname + '/../../../fixtures/bpmn/draw/gateways.bpmn', 'utf8');
|
2014-06-18 09:45:30 +00:00
|
|
|
bootstrapBpmnJS(xml)(done);
|
2014-04-30 14:36:02 +00:00
|
|
|
});
|
|
|
|
|
2014-05-09 13:20:29 +00:00
|
|
|
|
2014-05-27 15:48:04 +00:00
|
|
|
it('should render group', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync(__dirname + '/../../../fixtures/bpmn/draw/group.bpmn', 'utf8');
|
2014-06-18 09:45:30 +00:00
|
|
|
bootstrapBpmnJS(xml)(done);
|
2014-04-25 11:31:18 +00:00
|
|
|
});
|
|
|
|
|
2014-05-09 13:20:29 +00:00
|
|
|
|
2014-05-27 15:48:04 +00:00
|
|
|
it('should render message marker', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync(__dirname + '/../../../fixtures/bpmn/draw/message-marker.bpmn', 'utf8');
|
2014-06-18 09:45:30 +00:00
|
|
|
bootstrapBpmnJS(xml)(done);
|
2014-05-27 15:48:04 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
2014-05-02 06:25:08 +00:00
|
|
|
it('should render pools', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync(__dirname + '/../../../fixtures/bpmn/draw/pools.bpmn', 'utf8');
|
2014-06-18 09:45:30 +00:00
|
|
|
bootstrapBpmnJS(xml)(done);
|
2014-05-02 06:25:08 +00:00
|
|
|
});
|
2014-05-09 13:20:29 +00:00
|
|
|
|
2014-05-27 15:48:04 +00:00
|
|
|
|
|
|
|
it('should render pool collection marker', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync(__dirname + '/../../../fixtures/bpmn/draw/pools-with-collection-marker.bpmn', 'utf8');
|
2014-06-18 09:45:30 +00:00
|
|
|
bootstrapBpmnJS(xml)(done);
|
2014-05-27 15:48:04 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
it('should render task types', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync(__dirname + '/../../../fixtures/bpmn/draw/task-types.bpmn', 'utf8');
|
2014-06-18 09:45:30 +00:00
|
|
|
bootstrapBpmnJS(xml)(done);
|
2014-05-27 15:48:04 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
it('should render text annotations', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync(__dirname + '/../../../fixtures/bpmn/draw/text-annotation.bpmn', 'utf8');
|
2014-06-18 09:45:30 +00:00
|
|
|
bootstrapBpmnJS(xml)(done);
|
2014-05-27 15:48:04 +00:00
|
|
|
});
|
|
|
|
|
2014-05-28 20:48:11 +00:00
|
|
|
|
|
|
|
it('should render flow markers', function(done) {
|
|
|
|
var xml = fs.readFileSync(__dirname + '/../../../fixtures/bpmn/flow-markers.bpmn', 'utf8');
|
2014-06-18 09:45:30 +00:00
|
|
|
bootstrapBpmnJS(xml)(done);
|
2014-05-28 20:48:11 +00:00
|
|
|
});
|
|
|
|
|
2014-04-25 11:31:18 +00:00
|
|
|
});
|