mirror of
https://github.com/bpmn-io/bpmn-js.git
synced 2025-08-26 04:32:44 +08:00
feat(modeling): repair broken connection dockings on import
Closes #479
This commit is contained in:
37
test/spec/features/modeling/behavior/ImportDockingFixSpec.js
Normal file
37
test/spec/features/modeling/behavior/ImportDockingFixSpec.js
Normal file
@ -0,0 +1,37 @@
|
||||
'use strict';
|
||||
|
||||
require('../../../../TestHelper');
|
||||
|
||||
/* global bootstrapModeler, inject */
|
||||
|
||||
var modelingModule = require('../../../../../lib/features/modeling'),
|
||||
coreModule = require('../../../../../lib/core');
|
||||
|
||||
|
||||
describe('features/modeling/behavior - ImportDockingFix', function() {
|
||||
|
||||
var diagramXML = require('./ImportDockingFix.bpmn');
|
||||
|
||||
beforeEach(bootstrapModeler(diagramXML, {
|
||||
modules: [
|
||||
coreModule,
|
||||
modelingModule
|
||||
]
|
||||
}));
|
||||
|
||||
|
||||
it('should correct dockings on import', inject(function(elementRegistry, modeling) {
|
||||
|
||||
// when
|
||||
var sequenceFlowConnection = elementRegistry.get('SequenceFlow'),
|
||||
associationConnection = elementRegistry.get('DataAssociation_1');
|
||||
|
||||
// then
|
||||
expect(sequenceFlowConnection).to.have.startDocking({ x: 191, y: 120 });
|
||||
expect(sequenceFlowConnection).to.have.endDocking({ x: 328, y: 120 });
|
||||
|
||||
expect(associationConnection).to.have.startDocking({ x: 437, y: 369 });
|
||||
expect(associationConnection).to.have.endDocking({ x: 328, y: 119 });
|
||||
}));
|
||||
|
||||
});
|
Reference in New Issue
Block a user