bpmn-js/test/spec/import/elements/GroupsSpec.js
Nico Rehwaldt 04ca31fac9 feat(lib): Promisify public APIs
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.
2020-04-29 11:12:23 +02:00

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;
})();
});
});
});
});