From a0b8254053c0bffc14f78f779af21796f352b338 Mon Sep 17 00:00:00 2001 From: Abdul Ahad Date: Fri, 30 Aug 2024 18:31:40 +0200 Subject: [PATCH] fix: boundary event labels Closes #141 --- rules/label-required.js | 4 ---- .../bundling/test/app.rollup.expected.js | 4 ---- .../bundling/test/app.webpack.expected.js | 4 ---- test/rules/label-required.mjs | 7 +++++++ .../invalid-boundary-event.bpmn | 20 +++++++++++++++++++ .../label-required/valid-boundary-event.bpmn | 2 +- 6 files changed, 28 insertions(+), 13 deletions(-) create mode 100644 test/rules/label-required/invalid-boundary-event.bpmn diff --git a/rules/label-required.js b/rules/label-required.js index 0003a55..3716323 100644 --- a/rules/label-required.js +++ b/rules/label-required.js @@ -23,10 +23,6 @@ module.exports = function() { return; } - if (is(node, 'bpmn:BoundaryEvent')) { - return; - } - // ignore sub-processes if (is(node, 'bpmn:SubProcess')) { diff --git a/test/integration/bundling/test/app.rollup.expected.js b/test/integration/bundling/test/app.rollup.expected.js index d093bbe..220c727 100644 --- a/test/integration/bundling/test/app.rollup.expected.js +++ b/test/integration/bundling/test/app.rollup.expected.js @@ -101,10 +101,6 @@ return; } - if (is$2(node, 'bpmn:BoundaryEvent')) { - return; - } - // ignore sub-processes if (is$2(node, 'bpmn:SubProcess')) { diff --git a/test/integration/bundling/test/app.webpack.expected.js b/test/integration/bundling/test/app.webpack.expected.js index a4a19b8..4190e24 100644 --- a/test/integration/bundling/test/app.webpack.expected.js +++ b/test/integration/bundling/test/app.webpack.expected.js @@ -187,10 +187,6 @@ module.exports = function() { return; } - if (is(node, 'bpmn:BoundaryEvent')) { - return; - } - // ignore sub-processes if (is(node, 'bpmn:SubProcess')) { diff --git a/test/rules/label-required.mjs b/test/rules/label-required.mjs index e803e68..fdfb3d5 100644 --- a/test/rules/label-required.mjs +++ b/test/rules/label-required.mjs @@ -85,6 +85,13 @@ RuleTester.verify('label-required', rule, { message, path: [ 'name' ] } + },{ + moddleElement: readModdle(__dirname + '/label-required/invalid-boundary-event.bpmn'), + report: { + id: 'Element', + message, + path: [ 'name' ] + } } ] }); \ No newline at end of file diff --git a/test/rules/label-required/invalid-boundary-event.bpmn b/test/rules/label-required/invalid-boundary-event.bpmn new file mode 100644 index 0000000..4c37eef --- /dev/null +++ b/test/rules/label-required/invalid-boundary-event.bpmn @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/test/rules/label-required/valid-boundary-event.bpmn b/test/rules/label-required/valid-boundary-event.bpmn index ebed73b..007803a 100644 --- a/test/rules/label-required/valid-boundary-event.bpmn +++ b/test/rules/label-required/valid-boundary-event.bpmn @@ -2,7 +2,7 @@ - +