2015-03-11 15:17:19 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var TestHelper = require('../../../TestHelper');
|
|
|
|
|
|
|
|
/* global bootstrapModeler, inject */
|
|
|
|
|
|
|
|
var modelingModule = require('../../../../lib/features/modeling'),
|
|
|
|
replaceModule = require('../../../../lib/features/replace'),
|
|
|
|
coreModule = require('../../../../lib/core');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
describe('features/replace - chooser', function() {
|
|
|
|
|
2015-03-31 12:17:15 +00:00
|
|
|
var diagramXML = require('../../../fixtures/bpmn/features/replace/01_replace.bpmn');
|
2015-03-11 15:17:19 +00:00
|
|
|
|
|
|
|
var testModules = [ coreModule, modelingModule, replaceModule ];
|
|
|
|
|
|
|
|
beforeEach(bootstrapModeler(diagramXML, { modules: testModules }));
|
|
|
|
|
|
|
|
|
|
|
|
describe('should show chooser', function() {
|
|
|
|
|
|
|
|
it('for task', inject(function(elementRegistry, modeling, bpmnReplace) {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var element = elementRegistry.get('Task_1');
|
|
|
|
|
|
|
|
// when
|
|
|
|
bpmnReplace.openChooser({ x: 100, y: 100 }, element);
|
|
|
|
|
|
|
|
// then
|
|
|
|
expect(null).toBeDefined();
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
|
|
it('for event event', inject(function(elementRegistry, modeling, bpmnReplace) {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var element = elementRegistry.get('StartEvent_1');
|
|
|
|
|
|
|
|
// when
|
|
|
|
bpmnReplace.openChooser({ x: 100, y: 100 }, element);
|
|
|
|
|
|
|
|
// then
|
|
|
|
expect(null).toBeDefined();
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
|
|
it('for gateway event', inject(function(elementRegistry, modeling, bpmnReplace) {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var element = elementRegistry.get('ExclusiveGateway_1');
|
|
|
|
|
|
|
|
// when
|
|
|
|
bpmnReplace.openChooser({ x: 100, y: 100 }, element);
|
|
|
|
|
|
|
|
// then
|
|
|
|
expect(null).toBeDefined();
|
|
|
|
}));
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|