From f2b47e17f305fc0304101583f243cff170d1156e Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Wed, 3 Nov 2021 09:13:35 +0100 Subject: [PATCH] test: verify drill down into legacy sub-processes --- .../bpmn/collapsed-sub-process-legacy.bpmn | 51 +++++++++++++++++++ test/spec/ModelerSpec.js | 16 +++++- test/spec/ViewerSpec.js | 17 +++++-- 3 files changed, 79 insertions(+), 5 deletions(-) create mode 100644 test/fixtures/bpmn/collapsed-sub-process-legacy.bpmn 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); }); });