diff --git a/test/fixtures/bpmn/collapsed-sub-process.bpmn b/test/fixtures/bpmn/collapsed-sub-process.bpmn new file mode 100644 index 0000000000..2efd45a24a --- /dev/null +++ b/test/fixtures/bpmn/collapsed-sub-process.bpmn @@ -0,0 +1,418 @@ + + + + + + sid-89A3F9F2-CCC8-46C7-816B-DD8AC8A98300 + + + sid-89A3F9F2-CCC8-46C7-816B-DD8AC8A98300 + sid-F06605E1-AEC1-4B39-8843-4AD3F547B557 + sid-FC2ECAF5-771E-4ED3-BEF6-EFAB45E79500 + + + sid-F06605E1-AEC1-4B39-8843-4AD3F547B557 + sid-31F6EC44-E44C-4121-B4FE-BD69AF208C05 + + sid-EB275CF2-5EF1-44FA-B41B-71EB37CC2657 + + + sid-EB275CF2-5EF1-44FA-B41B-71EB37CC2657 + sid-FB543319-8DFB-4445-AAA3-720137FB230B + + + + + + + sid-FB543319-8DFB-4445-AAA3-720137FB230B + sid-B99D259B-1BD5-45FF-BD57-FB99C360BAC0 + + sid-472B540C-A0CD-46F4-9640-DF692EC1BFFC + + + sid-472B540C-A0CD-46F4-9640-DF692EC1BFFC + sid-910420B0-D11B-4F9D-B285-703D8AC0BA90 + + sid-A7460113-CB75-491D-817B-5E1A8C606B8C + + + sid-A7460113-CB75-491D-817B-5E1A8C606B8C + sid-01982395-64E8-43EF-A6D3-CDD276C312AA + + + sid-01982395-64E8-43EF-A6D3-CDD276C312AA + + + + + + + + sid-910420B0-D11B-4F9D-B285-703D8AC0BA90 + + + + + + + + sid-B99D259B-1BD5-45FF-BD57-FB99C360BAC0 + + + + + + + + + + sid-FC2ECAF5-771E-4ED3-BEF6-EFAB45E79500 + sid-5B23450F-AF5E-4519-B134-32107776BD44 + + sid-E71F5783-AFE7-44ED-8A9C-378C95087448 + + + sid-E71F5783-AFE7-44ED-8A9C-378C95087448 + sid-6B9741CD-D94B-41C7-A2EA-63A4C9445E16 + + sid-3BB6D6CA-BF45-4D15-A1AB-64686C41DB32 + + + sid-3BB6D6CA-BF45-4D15-A1AB-64686C41DB32 + sid-4E25B80E-EF68-4EE5-BB08-C1F54F1A7C39 + + + sid-4E25B80E-EF68-4EE5-BB08-C1F54F1A7C39 + + + + + + + + sid-6B9741CD-D94B-41C7-A2EA-63A4C9445E16 + sid-1A9DABC6-6079-4BF2-9D49-C4DC9569C519 + + sid-E5404926-738D-4447-87FE-FC6DD1E8BEFC + + + sid-E5404926-738D-4447-87FE-FC6DD1E8BEFC + sid-FED62A8F-6C3A-4BB2-8DE9-18FB0B35B50E + + + sid-FED62A8F-6C3A-4BB2-8DE9-18FB0B35B50E + + + + + + + + sid-1A9DABC6-6079-4BF2-9D49-C4DC9569C519 + + + + + + + + + + + + + + + + sid-5B23450F-AF5E-4519-B134-32107776BD44 + sid-31F6EC44-E44C-4121-B4FE-BD69AF208C05 + sid-F7DA1903-6A1A-4858-AF4B-286A968C957F + + + sid-DCB98638-BEBD-4548-B501-F0E29AC71ED4 + + + + sid-DCB98638-BEBD-4548-B501-F0E29AC71ED4 + + + sid-F7DA1903-6A1A-4858-AF4B-286A968C957F + sid-3FAE72F2-4037-4CBA-8B89-01D7FC7FF3E3 + + + sid-3FAE72F2-4037-4CBA-8B89-01D7FC7FF3E3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/spec/ModelerSpec.js b/test/spec/ModelerSpec.js index b404ea33d9..71486defce 100644 --- a/test/spec/ModelerSpec.js +++ b/test/spec/ModelerSpec.js @@ -708,6 +708,32 @@ 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'); + + return createModeler(xml).then(function() { + var drilldown = container.querySelector('.bjs-drilldown'); + var breadcrumbs = container.querySelector('.bjs-breadcrumbs'); + + // assume + expect(drilldown).to.exist; + expect(breadcrumbs).to.exist; + expect(breadcrumbs.classList.contains('djs-element-hidden')).to.be.true; + + // when + drilldown.click(); + + // then + expect(breadcrumbs.classList.contains('djs-element-hidden')).to.be.false; + }); + + }); + + }); + + it('should expose Viewer and NavigatedViewer', function() { expect(Modeler.Viewer).to.equal(Viewer); expect(Modeler.NavigatedViewer).to.equal(NavigatedViewer); diff --git a/test/spec/ViewerSpec.js b/test/spec/ViewerSpec.js index fa1a3c9c68..5b6727d27f 100644 --- a/test/spec/ViewerSpec.js +++ b/test/spec/ViewerSpec.js @@ -366,6 +366,34 @@ describe('Viewer', function() { expect(viewer.get('eventBus')).to.equal(eventBus); }); }); + + }); + + + describe('drill down', function() { + + it('should allow drill down into collapsed sub-process', function() { + + var xml = require('../fixtures/bpmn/collapsed-sub-process.bpmn'); + + return createViewer(container, Viewer, xml).then(function() { + var drilldown = container.querySelector('.bjs-drilldown'); + var breadcrumbs = container.querySelector('.bjs-breadcrumbs'); + + // assume + expect(drilldown).to.exist; + expect(breadcrumbs).to.exist; + expect(breadcrumbs.classList.contains('djs-element-hidden')).to.be.true; + + // when + drilldown.click(); + + // then + expect(breadcrumbs.classList.contains('djs-element-hidden')).to.be.false; + }); + + }); + });