From 7d9ffa820a7ce14734096a5060cb587864c7f794 Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Tue, 6 May 2014 10:00:06 +0200 Subject: [PATCH] test(draw/BpmnRenderer): add collaboration label test --- test/fixtures/bpmn/labels/collaboration.bpmn | 73 ++++++++++++++++++++ test/spec/browser/import/LabelImportSpec.js | 28 ++++++-- 2 files changed, 96 insertions(+), 5 deletions(-) create mode 100644 test/fixtures/bpmn/labels/collaboration.bpmn diff --git a/test/fixtures/bpmn/labels/collaboration.bpmn b/test/fixtures/bpmn/labels/collaboration.bpmn new file mode 100644 index 00000000..a2d6a748 --- /dev/null +++ b/test/fixtures/bpmn/labels/collaboration.bpmn @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/spec/browser/import/LabelImportSpec.js b/test/spec/browser/import/LabelImportSpec.js index 9835c3ae..a15c5c3e 100644 --- a/test/spec/browser/import/LabelImportSpec.js +++ b/test/spec/browser/import/LabelImportSpec.js @@ -1,3 +1,5 @@ +'use strict'; + var fs = require('fs'); var Viewer = require('../../../../lib/Viewer'); @@ -17,15 +19,31 @@ describe('import - labels', function() { }); - it('should import embedded labels', function(done) { + describe('should import embedded labels', function() { - var xml = fs.readFileSync('test/fixtures/bpmn/labels/embedded.bpmn', 'utf8'); + it('on flow nodes', function(done) { - var renderer = new Viewer(container); + var xml = fs.readFileSync('test/fixtures/bpmn/labels/embedded.bpmn', 'utf8'); - renderer.importXML(xml, function(err) { - done(err); + var renderer = new Viewer(container); + + renderer.importXML(xml, function(err) { + done(err); + }); }); + + + it('on pools and lanes', function(done) { + + var xml = fs.readFileSync('test/fixtures/bpmn/labels/collaboration.bpmn', 'utf8'); + + var renderer = new Viewer(container); + + renderer.importXML(xml, function(err) { + done(err); + }); + }); + });