Skip to content

Commit

Permalink
WIP reconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
philippfromme committed Nov 14, 2019
1 parent 1cb64ba commit 35d976f
Showing 1 changed file with 43 additions and 1 deletion.
44 changes: 43 additions & 1 deletion test/spec/features/modeling/ReconnectConnectionSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,49 @@ describe('features/modeling - reconnect connection', function() {
}));


describe('reconnect', function() {

it('should execute', inject(function(modeling) {

// when
modeling.reconnect(connection, childShape, connection.target);

// then
expect(connection.source).to.equal(childShape);
}));


it('should undo', inject(function(modeling, commandStack) {

// given
var oldSource = connection.source;

modeling.reconnect(connection, childShape, connection.target);

// when
commandStack.undo();

// then
expect(connection.source).to.equal(oldSource);
}));


it('should redo', inject(function(modeling, commandStack) {

// given
modeling.reconnect(connection, childShape, connection.target);

// when
commandStack.undo();
commandStack.redo();

// then
expect(connection.source).to.equal(childShape);
}));

});


describe('reconnectStart', function() {

describe('passing position', function() {
Expand Down Expand Up @@ -122,7 +165,6 @@ describe('features/modeling - reconnect connection', function() {
});



describe('passing waypoints', function() {

it('should execute', inject(function(modeling) {
Expand Down

0 comments on commit 35d976f

Please sign in to comment.