test(snapping): simplify test case
This commit is contained in:
parent
27fec8bdf1
commit
b2179bd489
|
@ -559,13 +559,15 @@ describe('features/snapping - BpmnCreateMoveSnapping', function() {
|
|||
|
||||
var diagramXML = require('./BpmnCreateMoveSnapping.docking-create-mode.bpmn');
|
||||
|
||||
|
||||
beforeEach(bootstrapModeler(diagramXML, {
|
||||
modules: testModules
|
||||
}));
|
||||
|
||||
|
||||
it('should correctly set snap origins', function(done) {
|
||||
|
||||
bootstrapModeler(diagramXML, {
|
||||
container: TestContainer.get(this),
|
||||
modules: testModules
|
||||
})(function() {
|
||||
inject(function(elementRegistry, copyPaste, eventBus) {
|
||||
var test = inject(function(elementRegistry, copyPaste, eventBus) {
|
||||
|
||||
// given
|
||||
var task1 = elementRegistry.get('Task_1');
|
||||
|
@ -576,21 +578,24 @@ describe('features/snapping - BpmnCreateMoveSnapping', function() {
|
|||
var sequenceFlowSnapOrigin = snapContext.getSnapOrigin(snapLocations[3]);
|
||||
|
||||
// then
|
||||
try {
|
||||
expect(sequenceFlowSnapOrigin.x).to.be.eql(-30);
|
||||
expect(sequenceFlowSnapOrigin.y).to.be.eql(-10);
|
||||
|
||||
done();
|
||||
} catch (error) {
|
||||
done(error);
|
||||
}
|
||||
});
|
||||
|
||||
// when
|
||||
copyPaste.copy(task1);
|
||||
copyPaste.paste();
|
||||
|
||||
})();
|
||||
});
|
||||
|
||||
test();
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue