bpmn-js/test/spec/features/label-editing/TouchIntegrationSpec.js
Nico Rehwaldt f1daf4841f fix(modeling): support newBounds
This fixes a bug where Modeling#updateLabel would not work on
text annotations, because these need to have labels pre-configured.

* Modeling#updateLabel now takes the (optional) newBounds
* newBounds must now explicitly be passed to trigger resize
  for text annotations
* newBounds is _only_ passed for text annotations via
  LabelEditingProvider (it was discarded before anyway)
* lib/features/label-editing did not depend on lib/features/modeling
  for historical reasons. It now uses the offical #updateLabel
  API provided by Modeling
* Localize test diagrams

Closes #753
2018-01-29 17:20:41 +01:00

41 lines
805 B
JavaScript

'use strict';
require('../../../TestHelper');
var TestContainer = require('mocha-test-container-support');
var Modeler = require('lib/Modeler');
describe('direct editing - touch integration', function() {
var container;
beforeEach(function() {
container = TestContainer.get(this);
});
function createModeler(xml, done) {
var modeler = new Modeler({ container: container });
modeler.importXML(xml, function(err) {
done(err, modeler);
});
}
it('should work on modeler (manual test)', function(done) {
var xml = require('../../../fixtures/bpmn/simple.bpmn');
createModeler(xml, done);
});
it('should edit labels via double tap (manual test)', function(done) {
var xml = require('./LabelEditing.bpmn');
createModeler(xml, done);
});
});