diff --git a/test/fixtures/bpmn/collapsed-sub-process-legacy.bpmn b/test/fixtures/bpmn/collapsed-sub-process-legacy.bpmn new file mode 100644 index 00000000..36419099 --- /dev/null +++ b/test/fixtures/bpmn/collapsed-sub-process-legacy.bpmn @@ -0,0 +1,51 @@ + + + + + + + Flow_0obnxbt + + + + Flow_1d6ajf7 + + + Flow_0obnxbt + Flow_1d6ajf7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/spec/ModelerSpec.js b/test/spec/ModelerSpec.js index c023e046..d016f9a2 100644 --- a/test/spec/ModelerSpec.js +++ b/test/spec/ModelerSpec.js @@ -710,8 +710,7 @@ describe('Modeler', function() { describe('drill down', function() { - it('should allow drill down into collapsed sub-process', function() { - var xml = require('../fixtures/bpmn/collapsed-sub-process.bpmn'); + function verifyDrilldown(xml) { return createModeler(xml).then(function() { var drilldown = container.querySelector('.bjs-drilldown'); @@ -730,6 +729,19 @@ describe('Modeler', function() { expect(djsContainer.classList.contains('bjs-breadcrumbs-shown')).to.be.true; }); + } + + it('should allow drill down into collapsed sub-process', function() { + var xml = require('../fixtures/bpmn/collapsed-sub-process.bpmn'); + + return verifyDrilldown(xml); + }); + + + it('should allow drill down into legacy collapsed sub-process', function() { + var xml = require('../fixtures/bpmn/collapsed-sub-process-legacy.bpmn'); + + return verifyDrilldown(xml); }); }); diff --git a/test/spec/ViewerSpec.js b/test/spec/ViewerSpec.js index 32f87c5d..d41c867b 100644 --- a/test/spec/ViewerSpec.js +++ b/test/spec/ViewerSpec.js @@ -372,9 +372,7 @@ describe('Viewer', function() { describe('drill down', function() { - it('should allow drill down into collapsed sub-process', function() { - - var xml = require('../fixtures/bpmn/collapsed-sub-process.bpmn'); + function verifyDrilldown(xml) { return createViewer(container, Viewer, xml).then(function() { var drilldown = container.querySelector('.bjs-drilldown'); @@ -393,6 +391,19 @@ describe('Viewer', function() { expect(djsContainer.classList.contains('bjs-breadcrumbs-shown')).to.be.true; }); + } + + it('should allow drill down into collapsed sub-process', function() { + var xml = require('../fixtures/bpmn/collapsed-sub-process.bpmn'); + + return verifyDrilldown(xml); + }); + + + it('should allow drill down into legacy collapsed sub-process', function() { + var xml = require('../fixtures/bpmn/collapsed-sub-process-legacy.bpmn'); + + return verifyDrilldown(xml); }); });