From 832faf178c26ba753d211df67e954d770b2ecb50 Mon Sep 17 00:00:00 2001 From: Martin Stamm Date: Tue, 5 Oct 2021 15:36:17 +0200 Subject: [PATCH] chore(test): add data-association test case --- test/spec/import/ImporterSpec.js | 23 +++++++++++++++ test/spec/import/data-association.bpmn | 40 ++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 test/spec/import/data-association.bpmn diff --git a/test/spec/import/ImporterSpec.js b/test/spec/import/ImporterSpec.js index ed16d261..8f1dfc97 100644 --- a/test/spec/import/ImporterSpec.js +++ b/test/spec/import/ImporterSpec.js @@ -276,6 +276,29 @@ describe('import - Importer', function() { }); }); + + it('should import DataAssociations in root', function() { + + // given + var xml = require('./data-association.bpmn'); + + // given + var elementRegistry = diagram.get('elementRegistry'); + + + // when + return runImport(diagram, xml).then(function() { + + // then + var process = elementRegistry.get('Collaboration'), + association = elementRegistry.get('DataAssociation'), + dataStore = elementRegistry.get('DataStore'); + + expect(association.parent).to.eql(process); + expect(dataStore.parent).to.eql(process); + }); + }); + }); diff --git a/test/spec/import/data-association.bpmn b/test/spec/import/data-association.bpmn new file mode 100644 index 00000000..d839a51f --- /dev/null +++ b/test/spec/import/data-association.bpmn @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + DataStore + Property_1eojfva + + + + + + + + + + + + + + + + + + + + + + + +