mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-01-21 22:39:22 +00:00
04ca31fac9
This commit promisifies following APIs: BaseViewer#importXML BaseViewer#importDefinitions BaseViewer#open BaseViewer#saveXML BaseViewer#saveSVG Modeler#createDiagram Related to https://github.com/bpmn-io/bpmn-js/issues/812 BREAKING CHANGES: * Users are now expected to have Promises either by default or polyfilled as the APIs return a Promise now.
38 lines
670 B
JavaScript
38 lines
670 B
JavaScript
import {
|
|
bootstrapModeler,
|
|
inject
|
|
} from 'test/TestHelper';
|
|
|
|
|
|
describe('import - groups', function() {
|
|
|
|
describe('should import groups', function() {
|
|
|
|
it('with frame property set', function() {
|
|
var xml = require('./Groups.bpmn');
|
|
|
|
// given
|
|
return bootstrapModeler(xml)().then(function(result) {
|
|
|
|
var err = result.error;
|
|
|
|
expect(err).not.to.exist;
|
|
|
|
// when
|
|
inject(function(elementRegistry) {
|
|
|
|
// then
|
|
var groupElement = elementRegistry.get('Group_1');
|
|
|
|
expect(groupElement).to.exist;
|
|
expect(groupElement.isFrame).to.be.true;
|
|
})();
|
|
|
|
});
|
|
});
|
|
|
|
|
|
});
|
|
|
|
});
|