@@ -34,8 +34,11 @@ import zeebeModdleExtensions from 'zeebe-bpmn-moddle/resources/zeebe';
34
34
35
35
import diagramXML from './BusinessRuleImplementationProps.bpmn' ;
36
36
37
+ const GROUP_SELECTOR = '[data-group-id="group-businessRuleImplementation"]' ;
38
+ const IMPLEMENTATION_SELECTOR = 'select[name=businessRuleImplementation]' ;
37
39
38
- describe ( 'provider/zeebe - TargetProps' , function ( ) {
40
+
41
+ describe ( 'provider/zeebe - BusinessRuleImplementationProps' , function ( ) {
39
42
40
43
const testModules = [
41
44
BpmnPropertiesPanel ,
@@ -110,6 +113,9 @@ describe('provider/zeebe - TargetProps', function() {
110
113
// then
111
114
const implementation = getImplementationSelect ( container ) ;
112
115
expect ( implementation . value ) . to . equal ( '' ) ;
116
+
117
+ // and also
118
+ return expectEdited ( container , false ) ;
113
119
} ) ) ;
114
120
115
121
@@ -126,6 +132,9 @@ describe('provider/zeebe - TargetProps', function() {
126
132
// then
127
133
const implementation = getImplementationSelect ( container ) ;
128
134
expect ( implementation . value ) . to . equal ( 'dmn' ) ;
135
+
136
+ // and also
137
+ return expectEdited ( container , true ) ;
129
138
} ) ) ;
130
139
131
140
@@ -142,6 +151,9 @@ describe('provider/zeebe - TargetProps', function() {
142
151
// then
143
152
const implementation = getImplementationSelect ( container ) ;
144
153
expect ( implementation . value ) . to . equal ( 'jobWorker' ) ;
154
+
155
+ // and also
156
+ return expectEdited ( container , true ) ;
145
157
} ) ) ;
146
158
147
159
@@ -334,7 +346,7 @@ describe('provider/zeebe - TargetProps', function() {
334
346
// helper /////////////////
335
347
336
348
function getImplementationSelect ( container ) {
337
- return domQuery ( 'select[name=businessRuleImplementation]' , container ) ;
349
+ return domQuery ( IMPLEMENTATION_SELECTOR , container ) ;
338
350
}
339
351
340
352
function getTaskDefinition ( element ) {
@@ -354,3 +366,20 @@ function getTaskHeaders(element) {
354
366
355
367
return getExtensionElementsList ( businessObject , 'zeebe:TaskHeaders' ) [ 0 ] ;
356
368
}
369
+
370
+ async function expectEdited ( container , exists ) {
371
+
372
+ await wait ( 50 ) ;
373
+
374
+ const indicator = domQuery ( `${ GROUP_SELECTOR } .bio-properties-panel-dot` , container ) ;
375
+
376
+ if ( exists ) {
377
+ expect ( indicator ) . to . exist ;
378
+ } else {
379
+ expect ( indicator ) . not . to . exist ;
380
+ }
381
+ }
382
+
383
+ function wait ( ms ) {
384
+ return new Promise ( resolve => setTimeout ( resolve , ms ) ) ;
385
+ }
0 commit comments