test(project): register BpmnJS in integration tests
This commit is contained in:
parent
991ab38c3d
commit
a1be2ea631
|
@ -8,6 +8,11 @@ import {
|
|||
createEvent
|
||||
} from '../util/MockEvents';
|
||||
|
||||
import {
|
||||
setBpmnJS,
|
||||
clearBpmnJS
|
||||
} from 'test/TestHelper';
|
||||
|
||||
|
||||
describe('Modeler', function() {
|
||||
|
||||
|
@ -21,6 +26,8 @@ describe('Modeler', function() {
|
|||
|
||||
function createModeler(xml, done) {
|
||||
|
||||
clearBpmnJS();
|
||||
|
||||
modeler = new Modeler({
|
||||
container: container,
|
||||
keyboard: {
|
||||
|
@ -28,6 +35,8 @@ describe('Modeler', function() {
|
|||
}
|
||||
});
|
||||
|
||||
setBpmnJS(modeler);
|
||||
|
||||
modeler.importXML(xml, function(err, warnings) {
|
||||
done(err, warnings, modeler);
|
||||
});
|
||||
|
|
|
@ -4,6 +4,11 @@ import EditorActionsModule from 'lib/features/editor-actions';
|
|||
|
||||
import TestContainer from 'mocha-test-container-support';
|
||||
|
||||
import {
|
||||
setBpmnJS,
|
||||
clearBpmnJS
|
||||
} from 'test/TestHelper';
|
||||
|
||||
|
||||
describe('NavigatedViewer', function() {
|
||||
|
||||
|
@ -14,10 +19,15 @@ describe('NavigatedViewer', function() {
|
|||
});
|
||||
|
||||
function createViewer(xml, done) {
|
||||
|
||||
clearBpmnJS();
|
||||
|
||||
var viewer = new NavigatedViewer({
|
||||
container: container
|
||||
});
|
||||
|
||||
setBpmnJS(viewer);
|
||||
|
||||
viewer.importXML(xml, function(err, warnings) {
|
||||
done(err, warnings, viewer);
|
||||
});
|
||||
|
|
|
@ -12,6 +12,11 @@ import {
|
|||
isFunction
|
||||
} from 'min-dash';
|
||||
|
||||
import {
|
||||
setBpmnJS,
|
||||
clearBpmnJS
|
||||
} from 'test/TestHelper';
|
||||
|
||||
|
||||
describe('Viewer', function() {
|
||||
|
||||
|
@ -28,8 +33,12 @@ describe('Viewer', function() {
|
|||
diagramId = null;
|
||||
}
|
||||
|
||||
clearBpmnJS();
|
||||
|
||||
var viewer = new Viewer({ container: container });
|
||||
|
||||
setBpmnJS(viewer);
|
||||
|
||||
viewer.importXML(xml, diagramId, function(err, warnings) {
|
||||
done(err, warnings, viewer);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue