test(project): register BpmnJS in integration tests

This commit is contained in:
Nico Rehwaldt 2019-07-19 13:49:24 +02:00 committed by fake-join[bot]
parent 991ab38c3d
commit a1be2ea631
3 changed files with 28 additions and 0 deletions

View File

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

View File

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

View File

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