test(Modeler): add regression test for correct module injection

This commit is contained in:
Niklas Kiefer 2018-11-06 14:00:44 +01:00 committed by merge-me[bot]
parent 921eeb4843
commit e6c073ebea
1 changed files with 35 additions and 0 deletions

View File

@ -463,6 +463,41 @@ describe('Modeler', function() {
});
it('should inject mandatory modules', function(done) {
// given
var xml = require('../fixtures/bpmn/simple.bpmn');
// when
createModeler(xml, function(err, warnings, modeler) {
// then
expect(modeler.get('alignElements')).to.exist;
expect(modeler.get('autoPlace')).to.exist;
expect(modeler.get('bpmnAutoResize')).to.exist;
expect(modeler.get('autoScroll')).to.exist;
expect(modeler.get('bendpoints')).to.exist;
expect(modeler.get('bpmnCopyPaste')).to.exist;
expect(modeler.get('bpmnSearch')).to.exist;
expect(modeler.get('contextPad')).to.exist;
expect(modeler.get('copyPaste')).to.exist;
expect(modeler.get('alignElements')).to.exist;
expect(modeler.get('distributeElements')).to.exist;
expect(modeler.get('editorActions')).to.exist;
expect(modeler.get('keyboard')).to.exist;
expect(modeler.get('keyboardMoveSelection')).to.exist;
expect(modeler.get('labelEditingProvider')).to.exist;
expect(modeler.get('modeling')).to.exist;
expect(modeler.get('move')).to.exist;
expect(modeler.get('paletteProvider')).to.exist;
expect(modeler.get('resize')).to.exist;
expect(modeler.get('snapping')).to.exist;
done(err);
});
});
});