Skip to content

Commit

Permalink
feat(properties-panel): adjust FEEL error message
Browse files Browse the repository at this point in the history
  • Loading branch information
marstamm authored and merge-me[bot] committed Jan 29, 2024
1 parent d479639 commit e678c58
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/utils/properties-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,9 @@ export function getErrorMessage(id, report) {
executionPlatformVersion
} = report;

// do not override FEEL message
// adjust FEEL message
if (data.type === ERROR_TYPES.FEEL_EXPRESSION_INVALID) {
return;
return 'Unparsable FEEL expression.';
}

if (data.type === ERROR_TYPES.EXPRESSION_NOT_ALLOWED) {
Expand Down
27 changes: 27 additions & 0 deletions test/spec/utils/properties-panel.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,33 @@ describe('utils/properties-panel', function() {
const INVALID_FEEL = '===';


it('should adjust error message', async function() {

// given
const node = createElement('bpmn:ServiceTask', {
id: 'ServiceTask_1',
extensionElements: createElement('bpmn:ExtensionElements', {
values: [
createElement('zeebe:IoMapping', {
inputParameters: [
createElement('zeebe:Input', {
source: INVALID_FEEL
})
]
})
]
})
});

// when
const report = await getLintError(node, rule);
const entryIds = getEntryIds(report);

// then
expectErrorMessage(entryIds[ 0 ], 'Unparsable FEEL expression.', report);
});


it('should return error for input mapping', async function() {

// given
Expand Down

0 comments on commit e678c58

Please sign in to comment.