2014-05-27 15:48:04 +00:00
|
|
|
'use strict';
|
|
|
|
|
2018-04-02 19:01:53 +00:00
|
|
|
import {
|
|
|
|
bootstrapModeler,
|
|
|
|
bootstrapViewer,
|
|
|
|
inject
|
|
|
|
} from 'test/TestHelper';
|
2014-04-25 11:31:18 +00:00
|
|
|
|
2018-04-02 19:01:53 +00:00
|
|
|
import {
|
|
|
|
create as svgCreate
|
|
|
|
} from 'tiny-svg';
|
2017-12-16 23:06:01 +00:00
|
|
|
|
2018-04-02 19:01:53 +00:00
|
|
|
import coreModule from 'lib/core';
|
|
|
|
import rendererModule from 'lib/draw';
|
|
|
|
import modelingModule from 'lib/features/modeling';
|
2015-04-17 14:40:45 +00:00
|
|
|
|
2018-04-02 19:01:53 +00:00
|
|
|
import {
|
|
|
|
query as domQuery
|
|
|
|
} from 'min-dom';
|
2014-04-25 11:31:18 +00:00
|
|
|
|
2016-11-08 13:24:26 +00:00
|
|
|
function checkErrors(done) {
|
|
|
|
return function(err, warnings) {
|
|
|
|
expect(warnings).to.be.empty;
|
|
|
|
expect(err).not.to.exist;
|
|
|
|
done();
|
|
|
|
};
|
|
|
|
}
|
2014-04-25 11:31:18 +00:00
|
|
|
|
2018-04-02 19:01:53 +00:00
|
|
|
|
2014-06-18 09:45:30 +00:00
|
|
|
describe('draw - bpmn renderer', function() {
|
2014-04-25 11:31:18 +00:00
|
|
|
|
2014-05-27 15:48:04 +00:00
|
|
|
it('should render activity markers', function(done) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/activity-markers.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(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
|
|
|
|
2016-01-21 13:19:06 +00:00
|
|
|
it('should render association markers', function(done) {
|
|
|
|
var xml = require('../../fixtures/bpmn/draw/associations.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(done));
|
2016-01-21 13:19:06 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
2014-05-27 15:48:04 +00:00
|
|
|
it('should render activity markers (combination)', function(done) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/activity-markers-combination.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(done));
|
2014-05-19 14:22:55 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
2014-05-27 15:48:04 +00:00
|
|
|
it('should render conditional flows', function(done) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/conditional-flow.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(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) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/conditional-flow-default.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(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) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/conditional-flow-gateways.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(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) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/conditional-flow-typed-task.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(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) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/data-objects.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(done));
|
2014-05-05 15:22:43 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
2014-05-27 15:48:04 +00:00
|
|
|
it('should render events', function(done) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/events.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(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) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/events-interrupting.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(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) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/event-subprocesses-collapsed.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(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) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/event-subprocesses-expanded.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(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) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/gateways.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(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) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/group.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(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) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/message-marker.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(done));
|
2014-05-27 15:48:04 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
2014-05-02 06:25:08 +00:00
|
|
|
it('should render pools', function(done) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/pools.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(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) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/pools-with-collection-marker.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(done));
|
2014-05-27 15:48:04 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
it('should render task types', function(done) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/task-types.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(done));
|
2014-05-27 15:48:04 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
it('should render text annotations', function(done) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/text-annotation.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(done));
|
2014-05-27 15:48:04 +00:00
|
|
|
});
|
|
|
|
|
2014-05-28 20:48:11 +00:00
|
|
|
|
|
|
|
it('should render flow markers', function(done) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/flow-markers.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(done));
|
2014-05-28 20:48:11 +00:00
|
|
|
});
|
|
|
|
|
2015-12-23 11:59:14 +00:00
|
|
|
|
2014-07-09 08:02:34 +00:00
|
|
|
it('should render xor gateways blank and with X', function(done) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/xor.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(done));
|
2014-07-09 08:02:34 +00:00
|
|
|
});
|
|
|
|
|
2015-12-23 11:59:14 +00:00
|
|
|
|
2014-07-15 10:43:30 +00:00
|
|
|
it('should render boundary events with correct z-index', function(done) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/boundary-event-z-index.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(done));
|
2014-07-15 10:43:30 +00:00
|
|
|
});
|
|
|
|
|
2015-12-23 11:59:14 +00:00
|
|
|
|
2014-07-15 10:43:30 +00:00
|
|
|
it('should render boundary events without flowNodeRef', function(done) {
|
2016-06-07 06:46:45 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/boundary-event-without-refnode.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(done));
|
2014-07-15 10:43:30 +00:00
|
|
|
});
|
|
|
|
|
2015-12-23 11:59:14 +00:00
|
|
|
|
2014-07-15 10:43:30 +00:00
|
|
|
it('should render boundary event only once if referenced incorrectly via flowNodeRef (robustness)', function(done) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/boundary-event-with-refnode.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(done));
|
2014-07-15 10:43:30 +00:00
|
|
|
});
|
|
|
|
|
2015-12-23 11:59:14 +00:00
|
|
|
|
2014-08-18 10:38:41 +00:00
|
|
|
it('should render gateway event if attribute is missing in XML', function(done) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/draw/gateway-type-default.bpmn');
|
2016-11-08 13:24:26 +00:00
|
|
|
bootstrapViewer(xml)(checkErrors(done));
|
2014-08-18 10:38:41 +00:00
|
|
|
});
|
|
|
|
|
2015-04-17 14:40:45 +00:00
|
|
|
|
2016-12-05 12:20:15 +00:00
|
|
|
it.skip('should render colors', function(done) {
|
|
|
|
var xml = require('../../fixtures/bpmn/draw/colors.bpmn');
|
|
|
|
bootstrapViewer(xml)(checkErrors(done));
|
|
|
|
});
|
|
|
|
|
|
|
|
|
2015-12-23 11:59:14 +00:00
|
|
|
it('should render call activity', function(done) {
|
|
|
|
var xml = require('../../fixtures/bpmn/draw/call-activity.bpmn');
|
|
|
|
|
|
|
|
bootstrapViewer(xml)(function(err) {
|
|
|
|
|
|
|
|
inject(function(elementRegistry) {
|
|
|
|
|
|
|
|
var callActivityGfx = elementRegistry.getGraphics('CallActivity');
|
|
|
|
|
|
|
|
// make sure the + marker is shown
|
2016-09-14 06:18:56 +00:00
|
|
|
expect(domQuery('[data-marker=sub-process]', callActivityGfx)).to.exist;
|
2015-12-23 11:59:14 +00:00
|
|
|
|
2017-12-04 21:27:32 +00:00
|
|
|
done(err);
|
2015-12-23 11:59:14 +00:00
|
|
|
})();
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
it('should render adhoc sub process', function(done) {
|
|
|
|
var xml = require('../../fixtures/bpmn/draw/activity-markers-simple.bpmn');
|
|
|
|
|
|
|
|
bootstrapViewer(xml)(function(err) {
|
|
|
|
|
|
|
|
inject(function(elementRegistry) {
|
|
|
|
|
|
|
|
var callActivityGfx = elementRegistry.getGraphics('AdHocSubProcess');
|
|
|
|
|
|
|
|
// make sure the + marker is shown
|
2016-09-14 06:18:56 +00:00
|
|
|
expect(domQuery('[data-marker=adhoc]', callActivityGfx)).to.exist;
|
2015-12-23 11:59:14 +00:00
|
|
|
|
2017-12-04 21:27:32 +00:00
|
|
|
done(err);
|
2015-12-23 11:59:14 +00:00
|
|
|
})();
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
2017-09-29 09:08:20 +00:00
|
|
|
it('should add random ID suffix to marker ID', function(done) {
|
2017-11-10 20:07:26 +00:00
|
|
|
|
2017-09-29 09:08:20 +00:00
|
|
|
var xml = require('../../fixtures/bpmn/simple.bpmn');
|
|
|
|
bootstrapViewer(xml)(function(err) {
|
|
|
|
|
|
|
|
inject(function(canvas) {
|
|
|
|
var svg = canvas._svg;
|
|
|
|
var markers = svg.querySelectorAll('marker');
|
|
|
|
|
|
|
|
expect(markers[0].id).to.match(/^sequenceflow-end-white-black-[A-Za-z0-9]+$/);
|
|
|
|
})();
|
|
|
|
|
2017-12-04 21:27:32 +00:00
|
|
|
done(err);
|
2017-09-29 09:08:20 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
2016-12-20 15:54:45 +00:00
|
|
|
it('should properly render colored markers', function(done) {
|
|
|
|
|
|
|
|
var xml = require('../../fixtures/bpmn/draw/colors.bpmn');
|
|
|
|
bootstrapViewer(xml)(function(err) {
|
|
|
|
|
|
|
|
inject(function(canvas) {
|
|
|
|
var svg = canvas._svg;
|
|
|
|
var markers = svg.querySelectorAll('marker');
|
|
|
|
|
|
|
|
expect(markers).to.have.length(5);
|
2017-09-29 09:08:20 +00:00
|
|
|
expect(markers[0].id).to.match(/^sequenceflow-end-white-black-[A-Za-z0-9]{25}$/);
|
|
|
|
expect(markers[4].id).to.match(/^messageflow-start-white-fuchsia-[A-Za-z0-9]{25}$/);
|
2016-12-20 15:54:45 +00:00
|
|
|
})();
|
|
|
|
|
2017-12-04 21:27:32 +00:00
|
|
|
done(err);
|
2016-12-20 15:54:45 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
2017-12-16 23:06:01 +00:00
|
|
|
it('should render sequenceFlows without source', function(done) {
|
|
|
|
|
|
|
|
var xml = require('../../fixtures/bpmn/draw/colors.bpmn');
|
|
|
|
bootstrapModeler(xml, {
|
|
|
|
modules: [
|
|
|
|
coreModule,
|
|
|
|
rendererModule,
|
|
|
|
modelingModule
|
|
|
|
]
|
|
|
|
})(function(err) {
|
|
|
|
|
|
|
|
inject(function(elementFactory, graphicsFactory) {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var g = svgCreate('g');
|
|
|
|
|
|
|
|
var connection = elementFactory.create('connection', {
|
|
|
|
type: 'bpmn:SequenceFlow',
|
|
|
|
waypoints: [
|
|
|
|
{ x: 0, y: 0 },
|
|
|
|
{ x: 10, y: 100 }
|
|
|
|
]
|
|
|
|
});
|
|
|
|
|
|
|
|
var gfx = graphicsFactory.drawConnection(g, connection);
|
|
|
|
|
|
|
|
expect(gfx).to.exist;
|
|
|
|
})();
|
|
|
|
|
|
|
|
done(err);
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
2016-06-07 06:46:45 +00:00
|
|
|
describe('path', function() {
|
2015-10-09 23:36:35 +00:00
|
|
|
|
2017-12-12 22:39:09 +00:00
|
|
|
var diagramXML = require('./BpmnRenderer.simple-cropping.bpmn');
|
2015-04-17 14:40:45 +00:00
|
|
|
|
2015-10-09 23:36:35 +00:00
|
|
|
var testModules = [ coreModule, rendererModule ];
|
2015-04-17 14:40:45 +00:00
|
|
|
|
2015-10-09 23:36:35 +00:00
|
|
|
beforeEach(bootstrapModeler(diagramXML, { modules: testModules }));
|
2015-04-17 14:40:45 +00:00
|
|
|
|
2016-06-07 06:46:45 +00:00
|
|
|
describe('circle', function() {
|
2015-04-17 14:40:45 +00:00
|
|
|
|
2015-10-09 23:36:35 +00:00
|
|
|
it('should return a circle path', inject(function(canvas, elementRegistry, graphicsFactory) {
|
2015-04-17 14:40:45 +00:00
|
|
|
|
2015-10-09 23:36:35 +00:00
|
|
|
// given
|
|
|
|
var eventElement = elementRegistry.get('StartEvent_1');
|
2015-04-17 14:40:45 +00:00
|
|
|
|
2015-10-09 23:36:35 +00:00
|
|
|
// when
|
|
|
|
var startPath = graphicsFactory.getShapePath(eventElement);
|
2015-04-17 14:40:45 +00:00
|
|
|
|
2015-10-09 23:36:35 +00:00
|
|
|
// then
|
|
|
|
expect(startPath).to.equal('M247,343m0,-18a18,18,0,1,1,0,36a18,18,0,1,1,0,-36z');
|
|
|
|
}));
|
2015-04-17 14:40:45 +00:00
|
|
|
|
|
|
|
|
2015-10-09 23:36:35 +00:00
|
|
|
it('should return a diamond path', inject(function(canvas, elementRegistry, graphicsFactory) {
|
2015-04-17 14:40:45 +00:00
|
|
|
|
2015-10-09 23:36:35 +00:00
|
|
|
// given
|
|
|
|
var gatewayElement = elementRegistry.get('ExclusiveGateway_1');
|
2015-04-17 14:40:45 +00:00
|
|
|
|
2015-10-09 23:36:35 +00:00
|
|
|
// when
|
|
|
|
var gatewayPath = graphicsFactory.getShapePath(gatewayElement);
|
2015-04-17 14:40:45 +00:00
|
|
|
|
2015-10-09 23:36:35 +00:00
|
|
|
// then
|
|
|
|
expect(gatewayPath).to.equal('M418,318l25,25l-25,25l-25,-25z');
|
|
|
|
}));
|
2015-07-15 15:22:19 +00:00
|
|
|
|
2015-04-17 14:40:45 +00:00
|
|
|
|
2015-10-09 23:36:35 +00:00
|
|
|
it('should return a rounded rectangular path', inject(function(canvas, elementRegistry, graphicsFactory) {
|
2015-04-17 14:40:45 +00:00
|
|
|
|
2015-10-09 23:36:35 +00:00
|
|
|
// given
|
|
|
|
var subProcessElement = elementRegistry.get('SubProcess_1');
|
2015-04-17 14:40:45 +00:00
|
|
|
|
2015-10-09 23:36:35 +00:00
|
|
|
// when
|
|
|
|
var subProcessPath = graphicsFactory.getShapePath(subProcessElement);
|
2015-04-17 14:40:45 +00:00
|
|
|
|
2015-10-09 23:36:35 +00:00
|
|
|
// then
|
|
|
|
expect(subProcessPath).to.equal('M584,243l330,0a10,10,0,0,1,10,10l0,180a10,10,0,0,1,-10,10' +
|
|
|
|
'l-330,0a10,10,0,0,1,-10,-10l0,-180a10,10,0,0,1,10,-10z');
|
|
|
|
}));
|
2015-04-17 14:40:45 +00:00
|
|
|
|
|
|
|
|
2015-10-09 23:36:35 +00:00
|
|
|
it('should return a rectangular path', inject(function(canvas, elementRegistry, graphicsFactory) {
|
2015-04-17 14:40:45 +00:00
|
|
|
|
2015-10-09 23:36:35 +00:00
|
|
|
// given
|
|
|
|
var TextAnnotationElement = elementRegistry.get('TextAnnotation_1');
|
2015-04-17 14:40:45 +00:00
|
|
|
|
2015-10-09 23:36:35 +00:00
|
|
|
// when
|
|
|
|
var TextAnnotationPath = graphicsFactory.getShapePath(TextAnnotationElement);
|
2015-04-17 14:40:45 +00:00
|
|
|
|
2015-10-09 23:36:35 +00:00
|
|
|
// then
|
2016-12-01 12:17:44 +00:00
|
|
|
expect(TextAnnotationPath).to.equal('M368,156l100,0l0,80l-100,0z');
|
2015-10-09 23:36:35 +00:00
|
|
|
}));
|
2015-04-17 14:40:45 +00:00
|
|
|
|
2015-10-09 23:36:35 +00:00
|
|
|
});
|
2015-04-17 14:40:45 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
2017-11-10 20:07:26 +00:00
|
|
|
|
|
|
|
describe('extension API', function() {
|
|
|
|
|
|
|
|
var diagramXML = require('../../fixtures/bpmn/simple.bpmn');
|
|
|
|
|
|
|
|
beforeEach(bootstrapModeler(diagramXML, {
|
|
|
|
modules: [
|
|
|
|
coreModule,
|
|
|
|
rendererModule
|
|
|
|
]
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
|
|
it('should expose helpers', inject(function(bpmnRenderer) {
|
|
|
|
|
|
|
|
// then
|
|
|
|
expect(bpmnRenderer._drawPath).to.be.a('function');
|
|
|
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
});
|
|
|
|
|
2015-04-17 14:40:45 +00:00
|
|
|
});
|