style(tests): adopt cleaner pattern
This commit is contained in:
parent
5affe25705
commit
d73ffd5991
|
@ -318,16 +318,19 @@ describe('features/replace - bpmn replace', function() {
|
||||||
// given
|
// given
|
||||||
var shape = elementRegistry.get('Participant_2');
|
var shape = elementRegistry.get('Participant_2');
|
||||||
|
|
||||||
|
var expandedBounds = assign({}, getBounds(shape), { height: 250 });
|
||||||
|
|
||||||
// when
|
// when
|
||||||
var newShape = bpmnReplace.replaceElement(shape, { type: 'bpmn:Participant', isExpanded: true });
|
var newShape = bpmnReplace.replaceElement(shape, {
|
||||||
|
type: 'bpmn:Participant',
|
||||||
|
isExpanded: true
|
||||||
|
});
|
||||||
|
|
||||||
// then
|
// then
|
||||||
expect(isExpanded(newShape)).to.be.true; // expanded
|
expect(isExpanded(newShape)).to.be.true; // expanded
|
||||||
expect(newShape.children).to.be.empty;
|
expect(newShape.children).to.be.empty;
|
||||||
|
|
||||||
expect(newShape.width).to.equal(shape.width);
|
expect(newShape).to.have.bounds(expandedBounds);
|
||||||
// default height for expanded pool
|
|
||||||
expect(newShape.height).to.equal(250);
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue