Skip to content

Commit

Permalink
test: move test
Browse files Browse the repository at this point in the history
  • Loading branch information
philippfromme committed Jan 29, 2024
1 parent de2b47f commit 92d60dc
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions test/spec/features/lasso-tool/LassoToolSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,33 +143,42 @@ describe('features/lasso-tool', function() {
});


describe('visuals', function() {
describe('#activateLasso', function() {

beforeEach(inject(function(dragging) {
dragging.setOptions({ manual: true });
}));


it('should show lasso box', inject(function(lassoTool, canvas, dragging) {
it('should select after lasso', inject(function(lassoTool, dragging, selection, elementRegistry) {

// when
lassoTool.activateLasso(canvasEvent({ x: 100, y: 100 }));
dragging.move(canvasEvent({ x: 200, y: 300 }));
dragging.end();

// then
expect(canvas._svg.querySelector('.djs-lasso-overlay')).to.exist;
expect(selection.get()).to.eql([ elementRegistry.get('child') ]);
}));

});

it('should select after lasso', inject(function(lassoTool, dragging, selection, elementRegistry) {

describe('visuals', function() {

beforeEach(inject(function(dragging) {
dragging.setOptions({ manual: true });
}));


it('should show lasso box', inject(function(lassoTool, canvas, dragging) {

// when
lassoTool.activateLasso(canvasEvent({ x: 100, y: 100 }));
dragging.move(canvasEvent({ x: 200, y: 300 }));
dragging.end();

// then
expect(selection.get()).to.eql([ elementRegistry.get('child') ]);
expect(canvas._svg.querySelector('.djs-lasso-overlay')).to.exist;
}));

});
Expand Down

0 comments on commit 92d60dc

Please sign in to comment.