Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should fetch a job priority for an element', inject(function(propertiesPanel, selection, elementRegistry) {
// given
var shape = elementRegistry.get('ServiceTask'),
inputEl = 'input[name=jobPriority]';
// when
selection.select(shape);
var bo = getBusinessObject(shape),
inputValue = domQuery(inputEl, propertiesPanel._container).value;
// then
expect(bo.get('jobPriority')).to.equal(inputValue);
}));
it('should get a history time to live for a process', inject(function(propertiesPanel, selection, elementRegistry) {
// given
var shape = elementRegistry.get('Process_1'),
inputEl = 'input[name=historyTimeToLive]';
// when
selection.select(shape);
var bo = getBusinessObject(shape),
inputValue = domQuery(inputEl, propertiesPanel._container).value;
// then
expect(bo.get('historyTimeToLive')).to.equal(inputValue);
}));
it('should get candidate starter groups for a process', inject(function(propertiesPanel, selection, elementRegistry) {
// given
var shape = elementRegistry.get('Process_1'),
inputEl = 'input[name=candidateStarterGroups]';
// when
selection.select(shape);
var bo = getBusinessObject(shape),
inputValue = domQuery(inputEl, propertiesPanel._container).value;
// then
expect(bo.get('candidateStarterGroups')).to.equal(inputValue);
}));
it('should get existing variableName (parent: event sub process)', inject(function(propertiesPanel, selection, elementRegistry) {
// given
var shape = elementRegistry.get('StartEvent_3');
var bo = getBusinessObject(shape);
// when
selection.select(shape);
var textField = domQuery('input[name=variableName]', propertiesPanel._container);
// then
expect(textField.value).to.equal(bo.eventDefinitions[0].get('camunda:variableName'));
}));
it('should fetch a retry time cycle for an element with timer def', inject(function(propertiesPanel, selection, elementRegistry) {
var shape = elementRegistry.get('BoundaryEvent'),
inputEl = 'div[data-entry=retryTimeCycle] input[name=cycle]';
selection.select(shape);
var bo = getBusinessObject(shape),
inputValue = domQuery(inputEl, propertiesPanel._container).value;
var retryTimer = bo.get('extensionElements').get('values')[1];
expect(retryTimer.get('body')).to.equal(inputValue);
expect(retryTimer.get('body')).to.equal('asd');
}));
function getInputField(container, entryId, inputName) {
var selector = 'input' + (inputName ? '[name="' + inputName + '"]' : '');
return domQuery(selector, getEntry(container, entryId));
}
function getInputField(container, entryId, inputName) {
var selector = 'input' + (inputName ? '[name="' + inputName + '"]' : '');
return domQuery(selector, getEntry(container, entryId));
}
function getInputField(container, groupId, entryId, inputName) {
var selector = 'input' + (inputName ? '[name="' + inputName + '"]' : '');
return domQuery(selector, getEntry(container, groupId, entryId));
}
function getInputField(container, entryId, inputName) {
const selector = 'input' + (inputName ? '[name="' + inputName + '"]' : '');
return domQuery(selector, getEntry(container, entryId));
}
function getInputField(container, entryId, inputName) {
const selector = 'input' + (inputName ? '[name="' + inputName + '"]' : '');
return domQuery(selector, getEntry(container, entryId));
}