Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeEach(inject(function(elementRegistry, selection) {
// given
const shape = elementRegistry.get('TimerEvent_1');
selection.select(shape);
const bo = getBusinessObject(shape);
const timerDefinition = eventDefinitionHelper.getTimerEventDefinition(bo);
timeDuration = timerDefinition.timeDuration;
input = getInputField(container, 'camunda-timer-event-duration', 'timerDefinition');
// when
triggerValue(input, 'foo', 'change');
}));
beforeEach(inject(function(elementRegistry, selection) {
// given
const shape = elementRegistry.get('TIME_DURATION');
selection.select(shape);
const bo = getBusinessObject(shape);
const timerDefinition = eventDefinitionHelper.getTimerEventDefinition(bo);
timeDuration = timerDefinition.timeDuration;
input = getTimerDefinitionField(container);
// when
triggerValue(input, 'foo', 'change');
}));
beforeEach(inject(function(elementRegistry, selection) {
// when
const shape = elementRegistry.get('WITHOUT_TYPE');
selection.select(shape);
const bo = getBusinessObject(shape);
timerDefinition = eventDefinitionHelper.getTimerEventDefinition(bo);
}));
beforeEach(inject(function(elementRegistry, selection) {
// when
const shape = elementRegistry.get('TIME_DATE');
selection.select(shape);
const bo = getBusinessObject(shape);
timerDefinition = eventDefinitionHelper.getTimerEventDefinition(bo);
}));
beforeEach(inject(function(elementRegistry, selection) {
// given
const shape = elementRegistry.get('TIME_DATE');
selection.select(shape);
const bo = getBusinessObject(shape);
const timerDefinition = eventDefinitionHelper.getTimerEventDefinition(bo);
timeDate = timerDefinition.timeDate;
input = getTimerDefinitionField(container);
// when
triggerValue(input, 'foo', 'change');
}));
beforeEach(inject(function(elementRegistry, selection) {
// given
const shape = elementRegistry.get('TIME_CYCLE');
selection.select(shape);
const bo = getBusinessObject(shape);
const timerDefinition = eventDefinitionHelper.getTimerEventDefinition(bo);
timeCycle = timerDefinition.timeCycle;
input = getTimerDefinitionField(container);
// when
triggerValue(input, 'foo', 'change');
}));
beforeEach(inject(function(elementRegistry, selection) {
// given
const shape = elementRegistry.get('TIME_CYCLE');
selection.select(shape);
const bo = getBusinessObject(shape);
const timerDefinition = eventDefinitionHelper.getTimerEventDefinition(bo);
timeCycle = timerDefinition.timeCycle;
input = getTimerDefinitionField(container);
// when
triggerValue(input, 'foo', 'change');
}));
export default function(group, element, bpmnFactory) {
const timerEventDefinition = eventDefinitionHelper.getTimerEventDefinition(element);
const timerOptions = getTimerOptions(element);
if (!timerEventDefinition) {
return;
}
if (!timerOptions.length) {
return timerDurationDefinitionImpl(group, bpmnFactory, timerEventDefinition);
}
timerEventDefinitionImpl(group, bpmnFactory, timerEventDefinition, timerOptions);
}