mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-01-13 10:34:55 +00:00
d3449ca87c
* use ES6 import / export * UTILS: export individual utilities * TESTS: localize TestHelper includes BREAKING CHANGE: * all utilities export independent functions * library sources got ported to ES6. You must now use a ES module bundler such as Browserify + babelify or Webpack to consume this library (or parts of it).
57 lines
1.1 KiB
JavaScript
57 lines
1.1 KiB
JavaScript
'use strict';
|
|
|
|
import NavigatedViewer from 'lib/NavigatedViewer';
|
|
|
|
|
|
describe('NavigatedViewer', function() {
|
|
|
|
var container;
|
|
|
|
beforeEach(function() {
|
|
container = document.createElement('div');
|
|
document.body.appendChild(container);
|
|
});
|
|
|
|
|
|
|
|
function createViewer(xml, done) {
|
|
var viewer = new NavigatedViewer({ container: container });
|
|
|
|
viewer.importXML(xml, function(err, warnings) {
|
|
done(err, warnings, viewer);
|
|
});
|
|
}
|
|
|
|
|
|
it('should import simple process', function(done) {
|
|
var xml = require('../fixtures/bpmn/simple.bpmn');
|
|
createViewer(xml, done);
|
|
});
|
|
|
|
|
|
describe('navigation features', function() {
|
|
|
|
var xml = require('../fixtures/bpmn/simple.bpmn');
|
|
|
|
it('should include zoomScroll', function(done) {
|
|
|
|
createViewer(xml, function(err, warnings, viewer) {
|
|
expect(viewer.get('zoomScroll')).to.exist;
|
|
|
|
done(err);
|
|
});
|
|
});
|
|
|
|
|
|
it('should include moveCanvas', function(done) {
|
|
createViewer(xml, function(err, warnings, viewer) {
|
|
expect(viewer.get('moveCanvas')).to.exist;
|
|
|
|
done(err);
|
|
});
|
|
});
|
|
|
|
});
|
|
|
|
});
|