fix(replace-menu-provider): fix property name

* fix property name in order to ensure correct behavior
* adjust unit tests in order to ensure correct assertions
closes #571
This commit is contained in:
Philipp Fromme 2016-08-08 13:51:27 +02:00
parent 7ad344cfc5
commit 4714a7279d
2 changed files with 4 additions and 3 deletions

View File

@ -104,9 +104,10 @@ ReplaceMenuProvider.prototype.getEntries = function(element) {
var target = entry.target;
// hide cancel end events outside transactions
if (target.eventDefinition == 'bpmn:CancelEventDefinition' && !is(businessObject.$parent, 'bpmn:Transaction')) {
if (target.eventDefinitionType == 'bpmn:CancelEventDefinition' && !is(businessObject.$parent, 'bpmn:Transaction')) {
return false;
}
return differentType(entry);
});

View File

@ -761,7 +761,7 @@ describe('features/popup-menu - replace menu provider', function() {
// then
expect(queryEntry(popupMenu, 'replace-with-none-end')).to.be.null;
expect(getEntries(popupMenu)).to.have.length(9);
expect(getEntries(popupMenu)).to.have.length(8);
})
);
@ -799,7 +799,7 @@ describe('features/popup-menu - replace menu provider', function() {
openPopup(endEvent);
// then
expect(getEntries(popupMenu)).to.have.length(9);
expect(getEntries(popupMenu)).to.have.length(8);
})
);