Skip to content

Commit a542cfd

Browse files
committed
fix: ensure logical order of task listener event types
1 parent 931d42a commit a542cfd

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ All notable changes to [bpmn-js-properties-panel](https://github.com/bpmn-io/bpm
66

77
___Note:__ Yet to be released changes appear here._
88

9+
* `FIX`: ensure logical order of task listener event types ([#1102](https://github.com/bpmn-io/bpmn-js-properties-panel/pull/1102))
10+
911
## 5.30.0
1012

1113
* `FEAT`: rename task listener event types ([#1098](https://github.com/bpmn-io/bpmn-js-properties-panel/pull/1098))

src/provider/zeebe/properties/TaskListener.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ import {
66

77
import { ListenerType, Retries } from './shared/Listener';
88

9-
export const EVENT_TYPE = [ 'completing', 'assigning' ];
9+
// ensure types are in logical order
10+
export const EVENT_TYPE = [
11+
'assigning',
12+
'completing'
13+
];
1014

1115
export const EVENT_TO_LABEL = {
12-
completing: 'Completing',
13-
assigning: 'Assigning'
16+
assigning: 'Assigning',
17+
completing: 'Completing'
1418
};
1519

1620
export function TaskListenerEntries(props) {

test/spec/provider/zeebe/TaskListenerProps.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ describe('provider/zeebe - TaskListenerProps', function() {
265265

266266
describe('event type', function() {
267267

268-
it('should use a supported event type for a new listener', inject(
268+
it('should use "assigning" as event type for a new listener', inject(
269269
async function(elementRegistry, selection) {
270270

271271
// given
@@ -288,7 +288,7 @@ describe('provider/zeebe - TaskListenerProps', function() {
288288
const listeners = getListeners(element);
289289
const newListener = listeners[listeners.length - 1];
290290

291-
expect(newListener).to.have.property('eventType', 'completing');
291+
expect(newListener).to.have.property('eventType', 'assigning');
292292
})
293293
);
294294

0 commit comments

Comments
 (0)