From d73ffd59914fa3937e1954f0050856a625e20d99 Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Mon, 29 Apr 2019 13:56:38 +0200 Subject: [PATCH] style(tests): adopt cleaner pattern --- test/spec/features/replace/BpmnReplaceSpec.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/spec/features/replace/BpmnReplaceSpec.js b/test/spec/features/replace/BpmnReplaceSpec.js index e58f5582..dc371e03 100644 --- a/test/spec/features/replace/BpmnReplaceSpec.js +++ b/test/spec/features/replace/BpmnReplaceSpec.js @@ -318,16 +318,19 @@ describe('features/replace - bpmn replace', function() { // given var shape = elementRegistry.get('Participant_2'); + var expandedBounds = assign({}, getBounds(shape), { height: 250 }); + // when - var newShape = bpmnReplace.replaceElement(shape, { type: 'bpmn:Participant', isExpanded: true }); + var newShape = bpmnReplace.replaceElement(shape, { + type: 'bpmn:Participant', + isExpanded: true + }); // then expect(isExpanded(newShape)).to.be.true; // expanded expect(newShape.children).to.be.empty; - expect(newShape.width).to.equal(shape.width); - // default height for expanded pool - expect(newShape.height).to.equal(250); + expect(newShape).to.have.bounds(expandedBounds); })); });