2018-04-02 19:01:53 +00:00
|
|
|
import TestContainer from 'mocha-test-container-support';
|
2016-06-07 06:46:45 +00:00
|
|
|
|
2018-04-02 19:01:53 +00:00
|
|
|
import Modeler from 'lib/Modeler';
|
2014-07-07 15:17:41 +00:00
|
|
|
|
|
|
|
|
2014-10-30 11:06:43 +00:00
|
|
|
describe('direct editing - touch integration', function() {
|
2014-07-07 15:17:41 +00:00
|
|
|
|
|
|
|
var container;
|
|
|
|
|
|
|
|
beforeEach(function() {
|
2015-07-15 15:22:19 +00:00
|
|
|
container = TestContainer.get(this);
|
2014-07-07 15:17:41 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
2020-04-29 09:02:42 +00:00
|
|
|
function createModeler(xml) {
|
2014-07-07 15:17:41 +00:00
|
|
|
var modeler = new Modeler({ container: container });
|
|
|
|
|
2020-04-29 09:02:42 +00:00
|
|
|
return modeler.importXML(xml).then(function(result) {
|
|
|
|
return { error: null, modeler: modeler };
|
|
|
|
}).catch(function(err) {
|
|
|
|
return { error: err, modeler: modeler };
|
2014-07-07 15:17:41 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-04-29 09:02:42 +00:00
|
|
|
it('should work on modeler (manual test)', function() {
|
2015-03-31 12:17:15 +00:00
|
|
|
var xml = require('../../../fixtures/bpmn/simple.bpmn');
|
2020-04-29 09:02:42 +00:00
|
|
|
return createModeler(xml).then(function(result) {
|
|
|
|
expect(result.error).not.to.exist;
|
|
|
|
});
|
2014-07-07 15:17:41 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
2020-04-29 09:02:42 +00:00
|
|
|
it('should edit labels via double tap (manual test)', function() {
|
2018-01-24 19:25:28 +00:00
|
|
|
var xml = require('./LabelEditing.bpmn');
|
2020-04-29 09:02:42 +00:00
|
|
|
return createModeler(xml).then(function(result) {
|
|
|
|
expect(result.error).not.to.exist;
|
|
|
|
});
|
2014-07-07 15:17:41 +00:00
|
|
|
});
|
|
|
|
|
2015-07-15 15:22:19 +00:00
|
|
|
});
|