fix(label-bounds): fix failing test case

This commit is contained in:
Philipp Fromme 2016-09-23 12:55:57 +02:00 committed by pedesen
parent db0ce65aa4
commit c111bea876
2 changed files with 5 additions and 9 deletions

View File

@ -40,7 +40,7 @@ describe('Modeler', function() {
}); });
it.only('should import complex', function(done) { it.skip('should import complex', function(done) {
var xml = require('../fixtures/bpmn/complex.bpmn'); var xml = require('../fixtures/bpmn/complex.bpmn');
createModeler(xml, done); createModeler(xml, done);
}); });

View File

@ -6,8 +6,6 @@ var Modeler = require('../../../../lib/Modeler');
var TestContainer = require('mocha-test-container-support'); var TestContainer = require('mocha-test-container-support');
var domQuery = require('min-dom/lib/query');
describe('label bounds', function() { describe('label bounds', function() {
@ -196,14 +194,12 @@ describe('label bounds', function() {
describe('interaction events', function() { describe('interaction events', function() {
it('should update bounds after element bounds have been updated', it('should update bounds after element bounds have been updated',
inject(function(interactionEvents, elementRegistry, bpmnRenderer) { inject(function(interactionEvents, elementRegistry, bpmnRenderer, graphicsFactory) {
// given // given
var shape = elementRegistry.get('StartEvent_1'), var shape = elementRegistry.get('StartEvent_1');
gfx = elementRegistry.getGraphics('StartEvent_1_label'),
hit = domQuery('.djs-hit', gfx);
var interactionEventSpy = sinon.spy(hit, 'attr'), var graphicsFactorySpy = sinon.spy(graphicsFactory, 'update'),
rendererSpy = sinon.spy(bpmnRenderer, 'drawShape'); rendererSpy = sinon.spy(bpmnRenderer, 'drawShape');
// when // when
@ -214,7 +210,7 @@ describe('label bounds', function() {
// updated the elements bounds dimensions and position // updated the elements bounds dimensions and position
sinon.assert.callOrder( sinon.assert.callOrder(
rendererSpy.withArgs(sinon.match.any, shape.label), rendererSpy.withArgs(sinon.match.any, shape.label),
interactionEventSpy graphicsFactorySpy
); );
}) })
); );