style(tests): adopt cleaner pattern

This commit is contained in:
Nico Rehwaldt 2019-04-29 13:56:38 +02:00 committed by merge-me[bot]
parent 5affe25705
commit d73ffd5991
1 changed files with 7 additions and 4 deletions

View File

@ -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);
})); }));
}); });