2014-05-06 08:00:06 +00:00
|
|
|
'use strict';
|
|
|
|
|
2014-06-18 09:45:30 +00:00
|
|
|
var Matchers = require('../../../Matchers'),
|
|
|
|
TestHelper = require('../../../TestHelper');
|
|
|
|
|
2014-08-05 06:17:22 +00:00
|
|
|
/* global bootstrapViewer, inject */
|
2014-04-25 14:14:36 +00:00
|
|
|
|
|
|
|
|
2014-06-18 09:45:30 +00:00
|
|
|
var fs = require('fs');
|
2014-04-25 14:14:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
describe('import - labels', function() {
|
|
|
|
|
2014-07-30 14:06:32 +00:00
|
|
|
beforeEach(Matchers.addDeepEquals);
|
2014-04-25 14:14:36 +00:00
|
|
|
|
|
|
|
|
2014-05-06 08:00:06 +00:00
|
|
|
describe('should import embedded labels', function() {
|
|
|
|
|
|
|
|
it('on flow nodes', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync('test/fixtures/bpmn/import/labels/embedded.bpmn', 'utf8');
|
2014-08-05 06:17:22 +00:00
|
|
|
bootstrapViewer(xml)(done);
|
2014-04-25 14:14:36 +00:00
|
|
|
});
|
2014-05-06 08:00:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
it('on pools and lanes', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync('test/fixtures/bpmn/import/labels/collaboration.bpmn', 'utf8');
|
2014-08-05 06:17:22 +00:00
|
|
|
bootstrapViewer(xml)(done);
|
2014-05-06 08:00:06 +00:00
|
|
|
});
|
|
|
|
|
2014-06-17 09:03:03 +00:00
|
|
|
|
|
|
|
it('on message flows', function(done) {
|
|
|
|
var xml = fs.readFileSync('test/fixtures/bpmn/import/labels/collaboration-message-flows.bpmn', 'utf8');
|
2014-08-05 06:17:22 +00:00
|
|
|
bootstrapViewer(xml)(done);
|
2014-06-17 09:03:03 +00:00
|
|
|
});
|
|
|
|
|
2014-04-25 14:14:36 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
describe('should import external labels', function() {
|
|
|
|
|
|
|
|
it('with di', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync('test/fixtures/bpmn/import/labels/external.bpmn', 'utf8');
|
2014-08-05 06:17:22 +00:00
|
|
|
bootstrapViewer(xml)(done);
|
2014-04-25 14:14:36 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
it('without di', function(done) {
|
2014-06-13 08:58:38 +00:00
|
|
|
var xml = fs.readFileSync('test/fixtures/bpmn/import/labels/external-no-di.bpmn', 'utf8');
|
2014-08-05 06:17:22 +00:00
|
|
|
bootstrapViewer(xml)(done);
|
2014-04-25 14:14:36 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|