2015-01-10 11:04:26 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var TestHelper = require('../TestHelper');
|
|
|
|
|
|
|
|
var NavigatedViewer = require('../../lib/NavigatedViewer');
|
|
|
|
|
|
|
|
|
|
|
|
describe('NavigatedViewer', function() {
|
|
|
|
|
|
|
|
var container;
|
|
|
|
|
|
|
|
beforeEach(function() {
|
|
|
|
container = jasmine.getEnv().getTestContainer();
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
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) {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../fixtures/bpmn/simple.bpmn');
|
2015-01-10 11:04:26 +00:00
|
|
|
createViewer(xml, done);
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
describe('navigation features', function() {
|
|
|
|
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../fixtures/bpmn/simple.bpmn');
|
2015-01-10 11:04:26 +00:00
|
|
|
|
|
|
|
it('should include zoomScroll', function(done) {
|
2015-03-31 12:17:15 +00:00
|
|
|
|
2015-01-10 11:04:26 +00:00
|
|
|
createViewer(xml, function(err, warnings, viewer) {
|
|
|
|
expect(viewer.get('zoomScroll')).toBeDefined();
|
|
|
|
|
|
|
|
done(err);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
it('should include moveCanvas', function(done) {
|
|
|
|
createViewer(xml, function(err, warnings, viewer) {
|
|
|
|
expect(viewer.get('moveCanvas')).toBeDefined();
|
|
|
|
|
|
|
|
done(err);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|