Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
describe('customs - replaceMenu', function() {
const diagramXML = require('./diagram.bpmn');
beforeEach(bootstrapModeler(diagramXML, { modules: testModules }));
it('should contain options for StartEvent', inject(function(
popupMenu, elementRegistry) {
// given
const startEvent = elementRegistry.get('StartEvent_1');
openPopup(startEvent);
const endEventEntry = queryEntry(popupMenu, 'replace-with-none-end'),
messageStartEntry = queryEntry(popupMenu, 'replace-with-message-start'),
timerStartEntry = queryEntry(popupMenu, 'replace-with-timer-start');
// then
expect(endEventEntry).to.exist;
expect(messageStartEntry).to.exist;
describe('features/modeling/behavior - create boundary events', function() {
const testModules = [
coreModule,
contextPadModule,
paletteModule,
modelingModule,
customModelingModule,
customModules
];
const processDiagramXML = require('./process-empty.bpmn');
beforeEach(bootstrapModeler(processDiagramXML, { modules: testModules }));
it('should execute on attach', inject(function(canvas, elementFactory, modeling, bpmnFactory) {
// given
const messageEventDefinition = bpmnFactory.create('bpmn:MessageEventDefinition');
const messageIntermediateCatchEvent = bpmnFactory.create('bpmn:IntermediateCatchEvent', {
eventDefinitions: [ messageEventDefinition ]
});
const intermediateEvent = elementFactory.create('shape', {
id: messageIntermediateCatchEvent.id,
businessObject: messageIntermediateCatchEvent
});
const rootElement = canvas.getRootElement(),
describe('customs - palette', function() {
const diagramXML = require('./diagram.bpmn');
beforeEach(bootstrapModeler(diagramXML, { modules: testModules }));
it('should provide zeebe related entries', inject(function(canvas) {
// when
const paletteElement = domQuery('.djs-palette', canvas._container);
const entries = domQueryAll('.entry', paletteElement);
// then
expect(entries.length).to.equal(12);
}));
it('should activate hand tool', inject(function(dragging) {
// when
triggerPaletteEntry('hand-tool');
const diagramXML = require('./TimerDuration.bpmn');
const testModules = [
coreModule, selectionModule, modelingModule,
propertiesPanelModule,
propertiesProviderModule
];
let container;
beforeEach(function() {
container = TestContainer.get(this);
});
beforeEach(bootstrapModeler(diagramXML, {
modules: testModules
}));
beforeEach(inject(function(commandStack, propertiesPanel) {
const undoButton = document.createElement('button');
undoButton.textContent = 'UNDO';
undoButton.addEventListener('click', () => {
commandStack.undo();
});
container.appendChild(undoButton);
propertiesPanel.attachTo(container);
coreModule, selectionModule, modelingModule,
propertiesPanelModule,
propertiesProviderModule
];
const moddleExtensions = {
zeebe: zeebeModdleExtensions
};
let container;
beforeEach(function() {
container = TestContainer.get(this);
});
beforeEach(bootstrapModeler(diagramXML, {
modules: testModules,
moddleExtensions
}));
beforeEach(inject(function(commandStack, propertiesPanel) {
const undoButton = document.createElement('button');
undoButton.textContent = 'UNDO';
undoButton.addEventListener('click', () => {
commandStack.undo();
});
container.appendChild(undoButton);
coreModule, selectionModule, modelingModule,
propertiesPanelModule,
propertiesProviderModule
];
const moddleExtensions = {
zeebe: zeebeModdleExtensions
};
let container;
beforeEach(function() {
container = TestContainer.get(this);
});
beforeEach(bootstrapModeler(diagramXML, {
modules: testModules,
moddleExtensions
}));
beforeEach(inject(function(commandStack, propertiesPanel) {
const undoButton = document.createElement('button');
undoButton.textContent = 'UNDO';
undoButton.addEventListener('click', () => {
commandStack.undo();
});
container.appendChild(undoButton);
const diagramXML = require('./SequenceFlow.bpmn');
const testModules = [
coreModule, selectionModule, modelingModule,
propertiesPanelModule,
propertiesProviderModule
];
let container;
beforeEach(function() {
container = TestContainer.get(this);
});
beforeEach(bootstrapModeler(diagramXML, {
modules: testModules
}));
beforeEach(inject(function(commandStack, propertiesPanel) {
const undoButton = document.createElement('button');
undoButton.textContent = 'UNDO';
undoButton.addEventListener('click', () => {
commandStack.undo();
});
container.appendChild(undoButton);
propertiesPanel.attachTo(container);
coreModule, selectionModule, modelingModule,
propertiesPanelModule,
propertiesProviderModule
];
const moddleExtensions = {
zeebe: zeebeModdleExtensions
};
let container;
beforeEach(function() {
container = TestContainer.get(this);
});
beforeEach(bootstrapModeler(diagramXML, {
modules: testModules,
moddleExtensions
}));
beforeEach(inject(function(commandStack, propertiesPanel) {
const undoButton = document.createElement('button');
undoButton.textContent = 'UNDO';
undoButton.addEventListener('click', () => {
commandStack.undo();
});
container.appendChild(undoButton);
coreModule, selectionModule, modelingModule,
propertiesPanelModule,
propertiesProviderModule
];
const moddleExtensions = {
zeebe: zeebeModdleExtensions
};
let container;
beforeEach(function() {
container = TestContainer.get(this);
});
beforeEach(bootstrapModeler(diagramXML, {
modules: testModules,
moddleExtensions
}));
beforeEach(inject(function(commandStack, propertiesPanel) {
const undoButton = document.createElement('button');
undoButton.textContent = 'UNDO';
undoButton.addEventListener('click', () => {
commandStack.undo();
});
container.appendChild(undoButton);
const diagramXML = require('./StartEventTimerEventDefinition.bpmn');
const testModules = [
coreModule, selectionModule, modelingModule,
propertiesPanelModule,
propertiesProviderModule
];
let container;
beforeEach(function() {
container = TestContainer.get(this);
});
beforeEach(bootstrapModeler(diagramXML, {
modules: testModules
}));
beforeEach(inject(function(commandStack, propertiesPanel) {
const undoButton = document.createElement('button');
undoButton.textContent = 'UNDO';
undoButton.addEventListener('click', function() {
commandStack.undo();
});
container.appendChild(undoButton);
propertiesPanel.attachTo(container);